Registry / testing / nva-test

nva-test

JSON →
library0.6.22jsnpmunverified

nva-test is a frontend unit and end-to-end test toolkit, serving as an integral part of the broader `nva` ecosystem. It is built upon established testing frameworks like Karma and Mocha, providing a command-line interface (CLI) for executing tests across various browser environments, including JSDOM, Chrome, and Internet Explorer. The package is currently in its `1.0.x` stable series, with `v1.0.59` being a recent iteration, indicating ongoing development and maintenance. Its primary mode of operation involves CLI commands, where testing configurations can be supplied via files or command-line options. A key differentiator is its seamless integration within `nva` projects, offering a cohesive testing workflow for applications developed using the `nva` framework. Users should anticipate a release cadence consistent with minor updates and bug fixes within the 1.x line.

npm install nva-test
INSTALL
IMPORT
SIG · NVA-TEST
N
nva-test
testingjavascriptv0.6.22
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

nva-test CLI
nva-test -w
nva-test is primarily a command-line tool. Direct programmatic JavaScript imports for running tests, unlike other `nva` packages like `nva-core` or `nva-task`, are not commonly documented for direct execution of the test runner itself. Its functionality is typically invoked via the `nva-test` binary, often with configuration supplied through a file specified via CLI options.

Demonstrates installation, configuration for code coverage with Babel, and basic command-line usage to run tests.

npm install nva-test --save-dev // Ensure babel-plugin-istanbul is installed for coverage (as a devDependency) npm install babel-plugin-istanbul --save-dev // Example .babelrc or babel.config.js snippet for coverage // This enables the istanbul plugin only in the 'test' environment // for code coverage instrumentation. // babel.config.js module.exports = { "env": { "test": { "plugins": ["istanbul"] } } }; // Run e2e tests using the nva-test CLI // The '-w' flag typically indicates 'watch' mode or a default test run. // For more complex configurations, a config file can be passed via '-c'. // For instance, 'nva-test -c test-config.js' might specify Karma/Mocha options. // In your package.json scripts: // "scripts": { // "test": "nva-test -w", // "test:coverage": "nva-test --coverage" // } // From the command line: nva-test -w
nva-test --version
Debug
Known issues
breakingThe transition from `0.x` to `1.x` versions of `nva-test` likely introduced breaking changes due to semantic versioning practices. While specific changes are not explicitly detailed in the provided release notes, users upgrading from `0.x` should review release notes or the `nva` documentation for potential API changes or configuration adjustments.
fix
Consult the `nva` project's official documentation or changelog for `nva-test` to identify specific breaking changes and necessary code or configuration updates when migrating from `0.x` to `1.x` versions.
affects: >=1.0.0
gotchaFor code coverage reporting, `babel-plugin-istanbul` must be explicitly installed as a development dependency and configured in your Babel setup (`.babelrc` or `babel.config.js`) to apply only in the 'test' environment. Forgetting this step will result in no coverage data being collected.
fix
Install `babel-plugin-istanbul` (`npm install babel-plugin-istanbul --save-dev`) and add it to your Babel configuration's `env.test.plugins` array.
affects: >=0.1.0
Errors
Common errors & fixes
nva-test: command not found
The `nva-test` package is either not installed, or its executable is not in your system's PATH. This typically happens if it's installed locally but not run via `npm scripts` or if `npm bin` is not in your PATH.
fix
Ensure `nva-test` is installed: `npm install nva-test --save-dev`. If installed locally, run it via `npm test` (if configured in `package.json`) or `npx nva-test`. If installed globally (`npm install -g nva-test`), ensure your global `npm bin` directory is in your system's PATH.
Cannot find plugin "istanbul" relative to file "<path_to_file>"
The `babel-plugin-istanbul` package is specified in your Babel configuration but is not installed or accessible, preventing Babel from correctly transpiling files for coverage.
fix
Install the missing plugin as a development dependency: `npm install babel-plugin-istanbul --save-dev`. Verify it's correctly listed in your `package.json` and that your Babel configuration is pointing to the correct plugin name.
Upgrade
Version history
0.6.22latest on npm
Audit
Dependencies
babel-plugin-istanbulrequiredRequired for JavaScript code coverage reporting.
Agent activity
4 hits · last 30 days
node
4
Resources
nva-test — npm install nva-test · libregistry