-
-
Notifications
You must be signed in to change notification settings - Fork 105
Labels
Description
We've standardized on using Jest instead of Mocha for all of our libraries.
- Remove
mocha
,chai
, andchai-spies
as dependencies and replace it withjest
- Copy
jest.config.js
from the module template - Remove the
resolutions
field frompackage.json
as we don't need it - Convert existing tests from Mocha/Chai syntax to Jest
- Replace the
test
script inpackage.json
with the equivalentjest
line (see the module template), and add atest:watch
script - If Bring linting pipeline in sync with module template #164 has already been completed, then add our
eslint-config-jest
package topackage.json
and add a Jest section to.eslintrc.js
(see the module template) - Run
yarn test
. If Jest does not report that 100% test coverage has not been achieved, then addjest-it-up
as a development dependency; otherwise adjust the coverage thresholds injest.config.js
to match the numbers reported.
Tasks:
- Migrate to 'jest'
- Add
jest-it-up
Definition of Done
- Whenever applies, any change unit tested, reviewed(approved) and documented(JSDOC at least)
- We have changelog entries for any related changes
- Any changed APIs have comprehensive inline documentation
- Any changed public APIs are well covered by unit tests
- Other items
- If a planning/research ticket, then the plan has been reviewed and approved by at least 1 team members