Skip to content

Create a unified script to run Jest & Karma tests

Paul Gascou-Vaillancourt requested to merge 58869-unified-fe-test-script into master

What does this MR do?

This MR introduces a Node script that handles running tests with both Jest and Karma.

Usage

Run all tests and exit

yarn test

Specify specs paths

Path specs paths as positional arguments:

yarn test app/assets/javascripts/notes/
yarn test specs/javascripts/notes/
yarn test specs/frontend/notes/

All lines above are equivalent, the script automatically performs string replacement to pass correct paths to Jest and Karma.

Run tests in parallel

Pass the -p flag to parallelize tests:

yarn test -p

Show usage

yarn test --help

Does this MR meet the acceptance criteria?

Conformity

Closes #58869 (closed)

Edited by Paul Slaughter

Merge request reports