Skip to content

Commit

Permalink
[[FIX]] Define npm scripts for each test suite
Browse files Browse the repository at this point in the history
This enables more optimized workflows. During general development,
contributors can run unit tests directly through:

    $ npm run test-unit

This suite gives rapid and precise feedback on the validity of local
changes. It also bypassing code style and linting checks which are
often temporarily violated while development is under way/

Exposure as a dedicated "run script" also allows for command-line flags
to be specifid directly to the test runner, i.e.

    $ npm run test-unit -- -t shadow

This change does *not* effect the behavior of `npm test` (as used by the
project's continuous integration environments); that command continues
to execute all tests.
  • Loading branch information
jugglinmike authored and lukeapage committed Jul 25, 2015
1 parent 92acdd1 commit 5c33ded
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
"coverage": "istanbul -- cover ./node_modules/.bin/nodeunit tests/unit",
"data": "node scripts/generate-identifier-data",
"pretest": "jshint src && jscs src",
"test": "nodeunit tests tests/regression tests/unit"
"test-cli": "nodeunit tests/cli.js",
"test-regression": "nodeunit tests/regression",
"test-unit": "nodeunit tests/unit",
"test": "npm run test-unit && npm run test-cli && npm run test-regression"
},

"main": "./src/jshint.js",
Expand Down

0 comments on commit 5c33ded

Please sign in to comment.