Skip to content
Snippets Groups Projects
Commit d43c09d7 authored by Paul Slaughter's avatar Paul Slaughter Committed by Evan Read
Browse files

Docs: Add when to use Jest section in frontend_testing

parent 7eda144e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -20,9 +20,18 @@ We have started to migrate frontend tests to the [Jest](https://jestjs.io) testi
 
Jest tests can be found in `/spec/frontend` and `/ee/spec/frontend` in EE.
 
It is not yet a requirement to use Jest. You can view the
[epic](https://gitlab.com/groups/gitlab-org/-/epics/873) of issues
we need to solve before being able to use Jest for all our needs.
### When should I use Jest over Karma?
If you need to update an existing Karma test file (found in `spec/javascripts`), you do not
need to migrate the whole spec to Jest. Simply updating the Karma spec to test your change
is fine. It is probably more appropriate to migrate to Jest in a separate merge request.
If you need to create a new test file, we strongly recommend creating one in Jest. This will
help support our migration and we think you'll love using Jest.
As always, please use discretion. Jest solves a lot of issues we experienced in Karma and
provides a better developer experience, however there are potentially unexpected issues
which could arise (especially with testing against browser specific features).
 
### Differences to Karma
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment