.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. .TH RUN.JS "1" "December 2016" "run.js 8.0.0" "User Commands" .SH NAME run.js \- Test-Anything-Protocol module for Node.js .SH DESCRIPTION .SS "Usage:" .IP tap [options] .PP Executes all the files and interprets their output as TAP formatted test result data. .PP To parse TAP data from stdin, specify "\-" as a filename. .PP Short options are parsed gnu\-style, so for example '\-bCRspec' would be equivalent to '\-\-bail \fB\-\-no\-color\fR \fB\-\-reporter\fR=\fI\,spec\/\fR' .PP If the \fB\-\-check\-coverage\fR or \fB\-\-coverage\-report\fR options are provided, but no test files are specified, then a coverage report or coverage check will be run on the data from the last test run. .PP Coverage is never enabled for stdin. .SH OPTIONS .TP \fB\-c\fR \fB\-\-color\fR Use colors (Default for TTY) .TP \fB\-C\fR \fB\-\-no\-color\fR Do not use colors (Default for non\-TTY) .TP \fB\-b\fR \fB\-\-bail\fR Bail out on first failure .TP \fB\-B\fR \fB\-\-no\-bail\fR Do not bail out on first failure (Default) .TP \fB\-R\fR \fB\-\-reporter=\fR Use the specified reporter. Defaults to \&'classic' when colors are in use, or 'tap' when colors are disabled. .TP Available reporters: classic doc dot dump json jsonstream landing list markdown min nyan progress silent spec tap xunit .TP \fB\-s\fR \fB\-\-save=\fR If exists, then it should be a linedelimited list of test files to run. If is not present, then all command\-line positional arguments are run. .TP After the set of test files are run, any failed test files are written back to the save file. .TP This way, repeated runs with \fB\-s\fR will re\-run failures until all the failures are passing, and then once again run all tests. .TP It's a good idea to .gitignore the file used for this purpose, as it will churn a lot. .TP \fB\-\-coverage\fR \fB\-\-cov\fR Capture coverage information using 'nyc' .TP If a COVERALLS_REPO_TOKEN environment variable is set, then coverage is captured by default and sent to the coveralls.io service. .TP \fB\-\-no\-coverage\fR \fB\-\-no\-cov\fR Do not capture coverage information. Note that if nyc is already loaded, then the coverage info will still be captured. .TP \fB\-\-coverage\-report=\fR Output coverage information using the specified istanbul/nyc reporter type. .TP Default is 'text' when running on the command line, or 'text\-lcov' when piping to coveralls. .TP If 'html' is used, then the report will be opened in a web browser after running. .TP This can be run on its own at any time after a test run that included coverage. .TP \fB\-\-no\-coverage\-report\fR Do not output a coverage report. .TP \fB\-\-no\-browser\fR Do not open a web browser after generating an html coverage report. .TP \fB\-t\fR \fB\-\-timeout=\fR Time out test files after seconds. Defaults to 30, or the value of the TAP_TIMEOUT environment variable. .TP \fB\-h\fR \fB\-\-help\fR print this thing you're looking at .TP \fB\-v\fR \fB\-\-version\fR show the version of this program .TP \fB\-\-node\-arg=\fR Pass an argument to Node binary in all child processes. Run 'node \fB\-\-help\fR' to see a list of all relevant arguments. This can be specified multiple times to pass multiple args to Node. .TP \fB\-gc\fR \fB\-\-expose\-gc\fR Expose the gc() function to Node tests .TP \fB\-\-debug\fR Run JavaScript tests with node \fB\-\-debug\fR .TP \fB\-\-debug\-brk\fR Run JavaScript tests with node \fB\-\-debug\-brk\fR .TP \fB\-\-harmony\fR Enable all Harmony flags in JavaScript tests .TP \fB\-\-strict\fR Run JS tests in 'use strict' mode .TP \fB\-\-test\-arg=\fR Pass an argument to test files spawned by the tap command line executable. This can be specified multiple times to pass multiple args to test scripts. .TP \fB\-\-nyc\-arg=\fR Pass an argument to nyc when running child processes with coverage enabled. This can be specified multiple times to pass multiple args to nyc. .TP \fB\-\-check\-coverage\fR Check whether coverage is within thresholds provided. Setting this explicitly will default \fB\-\-coverage\fR to true. .TP This can be run on its own any time after a test run that included coverage. .TP \fB\-\-branches\fR what % of branches must be covered? Setting this will default both \fB\-\-check\-coverage\fR and \fB\-\-coverage\fR to true. [default: 0] .TP \fB\-\-functions\fR what % of functions must be covered? Setting this explicitly will default both \fB\-\-check\-coverage\fR and \fB\-\-coverage\fR to true. [default: 0] .TP \fB\-\-lines\fR what % of lines must be covered? Setting this explicitly will default both \fB\-\-check\-coverage\fR and \fB\-\-coverage\fR to true. [default: 90] .TP \fB\-\-statements\fR what % of statements must be covered? Setting this explicitly will default both \fB\-\-check\-coverage\fR and \fB\-\-coverage\fR to true. [default: 0] .TP \fB\-\-100\fR Full coverage, 100%. Sets branches, statements, functions, and lines to 100. .TP \fB\-\-nyc\-help\fR Print nyc usage banner. Useful for viewing options for \fB\-\-nyc\-arg\fR. .TP \fB\-\-nyc\-version\fR Print version of nyc used by tap. .TP \fB\-\-dump\-config\fR Dump the config options in JSON format. .TP \fB\-\-\fR Stop parsing flags, and treat any additional command line arguments as filenames. .PP Environment Variables: .TP TAP_RCFILE A yaml formatted file which can set any of the above options. Defaults to $HOME/.taprc .TP TAP_TIMEOUT Default value for \fB\-\-timeout\fR option. .TP TAP_COLORS Set to '1' to force color output, or '0' to prevent color output. .TP TAP_BAIL Bail out on the first test failure. Used internally when '\-\-bailout' is set. .TP TAP Set to '1' to force standard TAP output, and suppress any reporters. Used when running child tests so that their output is parseable by the test harness. .TP _TAP_COVERAGE_ Reserved for internal use. .PP Config Files: .PP You can create a yaml file with any of the options above. By default, the file at ~/.taprc will be loaded, but the TAP_RCFILE environment variable can modify this. .PP Run 'tap \fB\-\-dump\-config\fR' for a listing of what can be set in that file. Each of the keys corresponds to one of the options above.