Skip to content

Commit

Permalink
Merge pull request caolan#260 from rsternagel/cmdlineoptdocfix
Browse files Browse the repository at this point in the history
Add missing docs for cmd line options '-t' and '-f'
  • Loading branch information
Caolan McMahon committed Apr 30, 2014
2 parents d616a63 + 5e20c49 commit ae9bdba
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ the API where possible, to make it easier to digest.
Tests are simply exported from a module, but they are still run in the order
they are defined.

__Note:__ Users of old nodeunit versions may remember using `ok`, `equals` and
`same` in the style of qunit, instead of the assert functions above. These
functions still exist for backwards compatibility, and are simply aliases to
__Note:__ Users of old nodeunit versions may remember using `ok`, `equals` and
`same` in the style of qunit, instead of the assert functions above. These
functions still exist for backwards compatibility, and are simply aliases to
their assert module counterparts.


Expand Down Expand Up @@ -233,6 +233,8 @@ is used.
* __--config FILE__ - load config options from a JSON file, allows
the customisation of color schemes for the default test reporter etc. See
bin/nodeunit.json for current available options.
* __-t testName__ - run specifc test only.
* __-f fullTestName__ - run specific test only. fullTestName is built so: "outerGroup - .. - innerGroup - testName".
* __--version__ or __-v__ - report nodeunit version
* __--help__ - show nodeunit help

Expand Down Expand Up @@ -412,7 +414,7 @@ context when setting up the sandbox.
var box_globals = {
// Passing module.exports into the sandbox will give your code access to it.
module: {exports: exports},
// Passing require into the sandbox will give your code access to use it AND
// Passing require into the sandbox will give your code access to use it AND
// will share the cache with modules already required from outside the sandbox.
require: require,
// Passing console into the sandbox will give your code access to it
Expand Down Expand Up @@ -440,7 +442,7 @@ to v0.2.1 fixes this.
__machineout__ reporter
----------------------------------------------

The default reporter is readable for human but not for machine analysis.
The default reporter is readable for human but not for machine analysis.
When you want to analyze the output of nodeunit, use __machineout__ reporter and you will get

<img src="https://github.com/caolan/nodeunit/raw/master/img/example_machineout.png" />
Expand All @@ -454,7 +456,7 @@ nodeunit with VIM.
That compiler uses __machineout__ reporter and it is useful to use
with [vim-makegreen](https://github.com/reinh/vim-makegreen).



Contributing
------------
Expand Down
6 changes: 3 additions & 3 deletions bin/nodeunit
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ var usage = "Usage: nodeunit [options] testmodule1.js testfolder [...] \n" +
" --config FILE the path to a JSON file with options\n" +
" --reporter FILE optional path to a reporter file to customize the output\n" +
" --list-reporters list available build-in reporters\n" +
" -t name, specify a test to run\n" +
" -f fullname, specify a specific test to run. fullname is built so: \"outerGroup - .. - innerGroup - testName\"\n" +
" -t testName, specify a test to run\n" +
" -f fullTestName, specify a specific test to run. fullTestName is built so: \"outerGroup - .. - innerGroup - testName\"\n" +
" -h, --help display this help and exit\n" +
" -v, --version output version information and exit";



// load default options
Expand Down
24 changes: 15 additions & 9 deletions doc/nodeunit.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,37 @@ Nodeunit is a simple unit testing tool based on the node.js assert module.

## OPTIONS

__--config FILE__:
__--config FILE__:
Load config options from a JSON file, allows the customisation
of color schemes for the default test reporter etc.
See bin/nodeunit.json for current available options.

__--reporter FILE__:
__--reporter FILE__:
You can set the test reporter to a custom module or on of the modules
in nodeunit/lib/reporters, when omitted, the default test runner is used.

__--list-reporters__:
__--list-reporters__:
List available build-in reporters.

__-h__, __--help__:
__-t testName__:
Run specifc test only.

__-f fullTestName__:
Run specific test only. fullTestName is built so: "outerGroup - .. - innerGroup - testName".

__-h__, __--help__:
Display the help and exit.

__-v__, __--version__:
__-v__, __--version__:
Output version information and exit.

__<file-or-directory>__:
You can run nodeunit on specific files or on all *\*.js* files inside
You can run nodeunit on specific files or on all *\*.js* files inside
a directory.

## AUTHORS

Written by Caolan McMahon and other nodeunit contributors.
Written by Caolan McMahon and other nodeunit contributors.
Contributors list: <http://github.com/caolan/nodeunit/contributors>.

## REPORTING BUGS
Expand All @@ -50,8 +56,8 @@ Report nodeunit bugs to <http://github.com/caolan/nodeunit/issues>.

## COPYRIGHT

Copyright © 2010 Caolan McMahon.
Nodeunit has been released under the MIT license:
Copyright © 2010 Caolan McMahon.
Nodeunit has been released under the MIT license:
<http://github.com/caolan/nodeunit/raw/master/LICENSE>.

## SEE ALSO
Expand Down

0 comments on commit ae9bdba

Please sign in to comment.