Forge the one FE test script
Description
As we migrate to Jest (&895 (closed)), we currently have two unit test scripts yarn run jest
and yarn run karma
.
Okay, so what's the problem?
As a contributor, when I make a change, I like to verify that the related unit test suite (e.g. yarn run karma -f spec/javascripts/vue_merge_request_widget
) is still passing before creating the merge request. It's fairly inconvenient to run both test suites in separate terminals.
Proposal
Let's create one yarn test
script that will run both and eventually run just jest.
- full test suite:
yarn test
would be the same as runningyarn karma
andyarn jest
- directories:
yarn test spec/javascripts/notes/
yarn test spec/frontend/notes/
yarn test app/assets/javascripts/notes/
yarn test notes/
- single files:
yarn test spec/javascripts/notes/components/note_form_spec.js
yarn test spec/frontend/notes/components/note_form_spec.js
yarn test app/assets/javascripts/notes/components/note_form.vue
yarn test notes/components/note_form.vue
Edited by Inactive Account