nvm-test v2.0.3
nvm-test
Test using differents Node versions with nvm.
Configurable & Extensible npm test using differents Node versions with nvm.
Usage:
nvm-test [versions] [options] Test using Node [versions]
nvm-test <command> [options] Execute the <command> plugin
Options:
-h, --help Show help [boolean]
-i, --install Specify the install command [string]
-t, --test Specify the test command [string]
-D, --dry-run Dry run the test [boolean]
-L, --log-level Set the log level [string]
-v, --version Show version number [boolean]By default it runs 2 (configurable) sub commands as Promises:
install command:
nvm which $version || nvm install $version
Which silently install the specified$versionif needed.test command:
npm test
Which run the configuredtestnpm scripts.
The command is always preceded bynvm use $versionin order to make the Node$versionused before the test.
Install
Prefer global install:npm install nvm-test -g
Or simply install as per project dev dependencies:npm install --save-dev nvm-test
CLI usage
nvm-test versions
Test using Node versions
Testing stable and v4 Node versions:
$ nvm-test stable v4 [options]Test using the Node version from .nvmrc file (default nvm behavior):
$ nvm-test [options]nvm-test <command> options
Execute the <command> plugin
Therefore the plugin must be available and installed in your project.
For example, install the travis plugin:
$ npm install nvm-test-plugin-travisAdd it to your .nvmrc.test.json project file:
{
"plugins": ["travis"]
}Then run the test using the Node versions from your .travis.yml file:
$ nvm-test travis [options]CLI options
-i, --install
Specify the install command
$ nvm-test -i "nvm install $version" [versions]
$ nvm-test --install "nvm install $version" [versions]Default: nvm which $version &> /dev/null || nvm install $version
The Node version will be silently installed if needed.
-t, --test
Specify the test command
$ nvm-test -t "npm test" [versions]
$ nvm-test --test "npm test" [versions]Default: npm test
Just run the npm test script.
-D, --dry-run
Dry run the test
Just echoes thetestcommand option for now
$ nvm-test -D [versions]
$ nvm-test --dry-run [versions]-L, --log-level
Set the log level
$ nvm-test -L info [versions]
$ nvm-test --log-level info [versions]Default: info, silly w/ NODE_ENV=development
Can be one of: silent, error, warn, info, verbose, or silly
-h, --help
Show help
$ nvm-test -h
$ nvm-test --helpShow the <command> plugin help
$ nvm-test <command> -h
$ nvm-test <command> --help-v, --version
Show
nvm-testversion number
$ nvm-test -v
$ nvm-test --versionJavaScript API usage
See the API documentation on GitHub
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago