WARNING: this is beta-quality software. Breaking changes are likely. Not recommended for production use without expert support.
The Jasmine rules run tests under the Jasmine framework with Bazel.
Add the @bazel/jasmine npm package to your devDependencies in package.json.
Your WORKSPACE should declare a yarn_install or npm_install rule named npm. It should then install the rules found in the npm packages using the install_bazel_dependencies function.
This causes the @bazel/jasmine package to be installed as a Bazel workspace named npm_bazel_jasmine.
Runs tests in NodeJS using the Jasmine test runner.
To debug the test, see debugging notes in nodejs_test.
jasmine_node_test(name, srcs, data, deps, expected_exit_code, tags, config_file, coverage, jasmine, jasmine_entry_point, kwargs)
nameName of the resulting label
srcsJavaScript source files containing Jasmine specs
Defaults to []
dataRuntime dependencies which will be loaded while the test executes
Defaults to []
depsOther targets which produce JavaScript, such as ts_library
Defaults to []
expected_exit_codeThe expected exit code for the test.
Defaults to 0
tagsBazel tags applied to test
Defaults to []
config_file(experimental) label of a file containing Jasmine JSON config.
Note that not all configuration options are honored, and we expect some strange feature interations. For example, the filter for which files are instrumented for code coverage doesn't understand the spec_files setting in the config.
See https://jasmine.github.io/setup/nodejs.html#configuration
Defaults to None
coverageEnables code coverage collection and reporting.
Defaults to False
jasmineA label providing the @bazel/jasmine npm dependency.
Defaults to "@npm//@bazel/jasmine"
jasmine_entry_pointA label providing the @bazel/jasmine entry point.
Defaults to "@npm//:node_modules/@bazel/jasmine/jasmine_runner.js"
kwargsRemaining arguments are passed to the test rule