Create a unified script to run Jest & Karma tests
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
Changelog entry-
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides Separation of EE specific content
Closes #58869 (closed)
Edited by Paul Slaughter