coderoad/coderoad-cli

Test Runner presets

ShMcK opened this issue · 0 comments

ShMcK commented

Simplify the test runner config setup based on the test runner.

Eg. Make a "mocha" test runner preset, rather than a recipe.

As an example:

{
 "testRunner": {
        "command": "./node_modules/.bin/mocha",
        "args": {
          "filter": "--grep",
          "tap": "--reporter=mocha-tap-reporter"
        }
}

Mocha requires:

  1. installed dependencies npm install mocha
  2. a reporter for TAP (currently from npm install mocha-tap-reporter)
  3. capture commands for filtering tests by a regex (--grep).
  4. package.json script to call "mocha"

All of this could be captured in a commit, and a testRunner config.