-
Notifications
You must be signed in to change notification settings - Fork 291
Command Line Usage
tebriel edited this page Feb 8, 2013
·
1 revision
Write the specifications for your code in *.js and *.coffee files in the spec/ directory (note: your specification files must end with either .spec.js or .spec.coffee; otherwise jasmine-node won't find them!). You can use sub-directories to better organise your specs.
If you have installed the npm package globally, you can run it with:
jasmine-node spec/
If you aren't using npm, you should add pwd
/lib to the $NODE_PATH
environment variable, then run:
node lib/jasmine-node/cli.js
-
--autotest
, provides automatic execution of specs after each change -
--coffee
, allow execution of .coffee specs -
--color
, indicates spec output should uses color to indicates passing (green) or failing (red) specs -
--noColor
, do not use color in the output -
-m, --match REGEXP
, match only specs comtaining "REGEXPspec" -
--matchall
, relax requirement of "spec" in spec file names -
--verbose
, verbose output as the specs are run -
--junitreport
, export tests results as junitreport xml format -
--output FOLDER
, defines the output folder for junitreport files -
--teamcity
, converts all console output to teamcity custom test runner commands. (Normally auto detected.) -
--runWithRequireJs
, loads all specs using requirejs instead of node's native require method -
--requireJsSetup
, file run before specs to include and configure RequireJS -
--test-dir
, the absolute root directory path where tests are located -
--nohelpers
, does not load helpers -
--forceexit
, force exit once tests complete -
--captureExceptions
, listen to global exceptions, report them and exit (interferes with Domains in NodeJs, so do not use if using Domains as well