Run your tests with Jenkins JS Builder using the "Jest" test runner.
The default location for tests is the
The file names need to match the pattern
jsx extension is also supported.
The default location can be overridden by calling
jjsbuilder --tasks test
Run the tests and produces test and coverage reports.
You can limit the tests that are run via the
test parameter. This is a pattern that is passed to Jest's testMatch parameter.
Run a single test.
jjsbuilder --tasks test -- --test test/src/js/foo/bar/foobar-spec
Runs any test with 'calculator' in the path or name.
jjsbuilder --tasks test -- --test calculator
Run any test inside of a 'math' folder.
jjsbuilder --tasks test -- --test /math/
JUnit test reports are stored in
reports/ and coverage reports in
Note that coverage is only measured for .js and .jsx files in the source directories (default:
jjsbuilder --tasks test:fast
Runs the tests but skips generation of reports and coverage. It also displays an OS notification when tests complete. This is good for local development.