Skip to content

Commit

Permalink
Some more formatting and information in man page
Browse files Browse the repository at this point in the history
  • Loading branch information
Sannis committed Oct 20, 2010
1 parent d4949a4 commit 2fda988
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 28 deletions.
6 changes: 4 additions & 2 deletions bin/nodeunit
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ var testrunner,

var usage = "Usage: nodeunit [options] testmodule1.js testfolder [...] \n" +
"Options:\n\n" +
" --config FILE the path to a JSON file with options\n" +
" --reporter FILE optional path to a reporter file to customize the output";
" --config FILE the path to a JSON file with options\n" +
" --reporter FILE optional path to a reporter file to customize the output\n" +
" -h, --help display this help and exit\n" +
" -v, --version output version information and exit";

// a very basic pseudo --options parser
args.forEach(function (arg) {
Expand Down
35 changes: 24 additions & 11 deletions doc/nodeunit.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ nodeunit(1) -- simple node.js unit testing tool

## SYNOPSIS

nodeunit [options] <testmodule1.js|testfolder1> [...]
nodeunit [options] <file-or-directory> [<file-or-directory> ...]

## DESCRIPTION

Expand All @@ -17,26 +17,39 @@ Nodeunit is a simple unit testing tool based on the node.js assert module.

## OPTIONS

* __--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.
* __--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.
* __--version__ or __-v__ - report nodeunit version
* __--help__ - show nodeunit help
__--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__:
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.

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

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

__<file-or-directory>__:
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

Report nodeunit bugs to <http://github.com/caolan/nodeunit/issues>.

## COPYRIGHT

Copyright © 2010 Caolan McMahon. License MIT: <http://github.com/caolan/nodeunit/raw/master/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
53 changes: 38 additions & 15 deletions man1/nodeunit.1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.SH "SYNOPSIS"
.
.nf
nodeunit [options] <testmodule1\.js|testfolder1> [\.\.\.]
nodeunit [options] <file\-or\-directory> [<file\-or\-directory> \.\.\.]
.
.fi
.
Expand All @@ -34,33 +34,56 @@ Allows the use of mocks and stubs
.IP "" 0
.
.SH "OPTIONS"
\fB\-\-config FILE\fR:
.
.IP "\(bu" 4
\fB\-\-reporter FILE\fR \- 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\.
.br
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\.
.
.IP "\(bu" 4
\fB\-\-config FILE\fR \- 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\.
.P
\fB\-\-reporter FILE\fR:
.
.IP "\(bu" 4
\fB\-\-version\fR or \fB\-v\fR \- report nodeunit version
.br
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\.
.
.IP "\(bu" 4
\fB\-\-help\fR \- show nodeunit help
.P
\fB\-h\fR, \fB\-\-help\fR:
.
.IP "" 0
.br
Display the help and exit\.
.
.P
\fB\-v\fR, \fB\-\-version\fR:
.
.br
Output version information and exit\.
.
.P
\fB<file\-or\-directory>\fR:
You can run nodeunit on specific files or on all \fI*\.js\fR files inside
.
.br
a directory\.
.
.SH "AUTHORS"
Written by Caolan McMahon and other nodeunit contributors\.
.
.br
Contributors list: \fIhttp://github\.com/caolan/nodeunit/contributors\fR\|\.
.
.SH "REPORTING BUGS"
Report nodeunit bugs to \fIhttp://github\.com/caolan/nodeunit/issues\fR\|\.
.
.SH "COPYRIGHT"
Copyright © 2010 Caolan McMahon\. License MIT: \fIhttp://github\.com/caolan/nodeunit/raw/master/LICENSE\fR\|\.
Copyright © 2010 Caolan McMahon\.
.
.br
Nodeunit has been released under the MIT license:
.
.br
\fIhttp://github\.com/caolan/nodeunit/raw/master/LICENSE\fR\|\.
.
.SH "SEE ALSO"
node(1)

0 comments on commit 2fda988

Please sign in to comment.