Skip to content

Commit ae9bdba

Browse files
author
Caolan McMahon
committed
Merge pull request caolan#260 from rsternagel/cmdlineoptdocfix
Add missing docs for cmd line options '-t' and '-f'
2 parents d616a63 + 5e20c49 commit ae9bdba

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ the API where possible, to make it easier to digest.
109109
Tests are simply exported from a module, but they are still run in the order
110110
they are defined.
111111

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

117117

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

@@ -412,7 +414,7 @@ context when setting up the sandbox.
412414
var box_globals = {
413415
// Passing module.exports into the sandbox will give your code access to it.
414416
module: {exports: exports},
415-
// Passing require into the sandbox will give your code access to use it AND
417+
// Passing require into the sandbox will give your code access to use it AND
416418
// will share the cache with modules already required from outside the sandbox.
417419
require: require,
418420
// Passing console into the sandbox will give your code access to it
@@ -440,7 +442,7 @@ to v0.2.1 fixes this.
440442
__machineout__ reporter
441443
----------------------------------------------
442444

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

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

457-
459+
458460

459461
Contributing
460462
------------

bin/nodeunit

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ var usage = "Usage: nodeunit [options] testmodule1.js testfolder [...] \n" +
2929
" --config FILE the path to a JSON file with options\n" +
3030
" --reporter FILE optional path to a reporter file to customize the output\n" +
3131
" --list-reporters list available build-in reporters\n" +
32-
" -t name, specify a test to run\n" +
33-
" -f fullname, specify a specific test to run. fullname is built so: \"outerGroup - .. - innerGroup - testName\"\n" +
32+
" -t testName, specify a test to run\n" +
33+
" -f fullTestName, specify a specific test to run. fullTestName is built so: \"outerGroup - .. - innerGroup - testName\"\n" +
3434
" -h, --help display this help and exit\n" +
3535
" -v, --version output version information and exit";
36-
36+
3737

3838

3939
// load default options

doc/nodeunit.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,37 @@ Nodeunit is a simple unit testing tool based on the node.js assert module.
1717

1818
## OPTIONS
1919

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

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

29-
__--list-reporters__:
29+
__--list-reporters__:
3030
List available build-in reporters.
3131

32-
__-h__, __--help__:
32+
__-t testName__:
33+
Run specifc test only.
34+
35+
__-f fullTestName__:
36+
Run specific test only. fullTestName is built so: "outerGroup - .. - innerGroup - testName".
37+
38+
__-h__, __--help__:
3339
Display the help and exit.
3440

35-
__-v__, __--version__:
41+
__-v__, __--version__:
3642
Output version information and exit.
3743

3844
__<file-or-directory>__:
39-
You can run nodeunit on specific files or on all *\*.js* files inside
45+
You can run nodeunit on specific files or on all *\*.js* files inside
4046
a directory.
4147

4248
## AUTHORS
4349

44-
Written by Caolan McMahon and other nodeunit contributors.
50+
Written by Caolan McMahon and other nodeunit contributors.
4551
Contributors list: <http://github.com/caolan/nodeunit/contributors>.
4652

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

5157
## COPYRIGHT
5258

53-
Copyright © 2010 Caolan McMahon.
54-
Nodeunit has been released under the MIT license:
59+
Copyright © 2010 Caolan McMahon.
60+
Nodeunit has been released under the MIT license:
5561
<http://github.com/caolan/nodeunit/raw/master/LICENSE>.
5662

5763
## SEE ALSO

0 commit comments

Comments
 (0)