majesticlabs-dev/majestic-marketplace

test-runner

Run test suite and return structured pass/fail results.

Vedi sorgente
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

Test Runner

Run tests and return structured results.

Input

yaml
scope: string  # Optional: directory, file path, or test name pattern

Process

  1. Detect framework from project files (if not provided):
  • spec/ + _spec.rb + .rspec = RSpec
  • test/ + _test.rb = Minitest
  • jest.config.js or *.test.js = Jest/Vitest
  • go.mod + _test.go = Go test
  • pytest.ini or conftest.py = pytest
  1. Run tests (scoped if provided, otherwise full suite)
  1. Parse output for pass/fail counts and failure details

Framework Commands

FrameworkRun AllRun FileRun Single
RSpecbundle exec rspecbundle exec rspec path/to/spec.rbbundle exec rspec path:LINE
Minitestbundle exec rake testruby -Itest path/to/test.rbruby -Itest path -n test_name
Jestnpx jestnpx jest path/to/test.jsnpx jest path -t "name"
pytestpytestpytest path/to/test.pypytest path::test_name
Gogo test ./...go test ./path/go test ./path/ -run TestName

Output

yaml
status: PASS | FAIL
total: int
passed: int
failed: int
failures:        # Only if failed
  - file: string
    line: int
    name: string
    message: string

Error Handling

ScenarioAction
Test framework unclearAsk user
Tests failReturn FAIL with failure details
Command errorReturn FAIL with stderr
dallo stesso repository

Altri Skills

Tutti gli Skills