{"id":13694,"library":"nva-test","title":"nva-test","description":"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.","status":"active","version":"0.6.22","language":"javascript","source_language":"en","source_url":"https://github.com/ali322/nva/tree/master/packages/nva-test","tags":["javascript"],"install":[{"cmd":"npm install nva-test","lang":"bash","label":"npm"},{"cmd":"yarn add nva-test","lang":"bash","label":"yarn"},{"cmd":"pnpm add nva-test","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for JavaScript code coverage reporting.","package":"babel-plugin-istanbul","optional":false}],"imports":[{"note":"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.","symbol":"nva-test CLI","correct":"nva-test -w"}],"quickstart":{"code":"npm install nva-test --save-dev\n\n// Ensure babel-plugin-istanbul is installed for coverage (as a devDependency)\nnpm install babel-plugin-istanbul --save-dev\n\n// Example .babelrc or babel.config.js snippet for coverage\n// This enables the istanbul plugin only in the 'test' environment\n// for code coverage instrumentation.\n// babel.config.js\nmodule.exports = {\n  \"env\": {\n    \"test\": {\n      \"plugins\": [\"istanbul\"]\n    }\n  }\n};\n\n// Run e2e tests using the nva-test CLI\n// The '-w' flag typically indicates 'watch' mode or a default test run.\n// For more complex configurations, a config file can be passed via '-c'.\n// For instance, 'nva-test -c test-config.js' might specify Karma/Mocha options.\n\n// In your package.json scripts:\n// \"scripts\": {\n//   \"test\": \"nva-test -w\",\n//   \"test:coverage\": \"nva-test --coverage\"\n// }\n\n// From the command line:\nnva-test -w","lang":"javascript","description":"Demonstrates installation, configuration for code coverage with Babel, and basic command-line usage to run tests."},"warnings":[{"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.","message":"The 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.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Install `babel-plugin-istanbul` (`npm install babel-plugin-istanbul --save-dev`) and add it to your Babel configuration's `env.test.plugins` array.","message":"For 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.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'1':138 '1.0':65 'across':49 'anticip':125 'applic':117 'broader':25 'browser':51 'bug':134 'built':30 'cadenc':128 'chrome':55 'cli':45,86 'cohes':113 'command':42,87,98 'command-lin':41,97 'configur':90 'consist':129 'current':62 'develop':77,118 'differenti':103 'ecosystem':27 'end':13,15 'end-to-end':12 'environ':52 'establish':32 'execut':47 'explor':58 'file':95 'fix':135 'framework':34,122 'frontend':9 'includ':53 'indic':75 'integr':21,107 'interfac':44 'internet':57 'involv':85 'iter':74 'javascript':141 'jsdom':54 'karma':36 'key':102 'like':35 'line':43,99,140 'mainten':79 'minor':131 'mocha':38 'mode':82 'nva':2,5,26,109,121 'nva-test':1,4 'offer':111 'ongo':76 'oper':84 'option':100 'packag':60 'part':22 'primari':81 'project':110 'provid':39 'recent':73 'releas':127 'seamless':106 'seri':68 'serv':18 'stabl':67 'suppli':93 'test':3,6,16,33,48,89,114 'toolkit':17 'unit':10 'updat':132 'upon':31 'use':119 'user':123 'v1.0.59':70 'various':50 'via':94 'within':108,136 'workflow':115 'x':66,139","created_at":"2026-04-20T01:55:49.949352+00:00","updated_at":"2026-04-20T01:55:49.949352+00:00","problems":[{"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.","cause":"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.","error":"nva-test: command not found"},{"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.","cause":"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.","error":"Cannot find plugin \"istanbul\" relative to file \"<path_to_file>\""}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"nva-test","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ali322/nva","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/nva-test","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-18","install_tag":null}}