Skip to content

test: migrate from mocha to jest #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 15, 2020
Merged

test: migrate from mocha to jest #164

merged 11 commits into from
Jun 15, 2020

Conversation

remarkablemark
Copy link
Owner

@remarkablemark remarkablemark commented Jun 15, 2020

What is the motivation for this pull request?

test: migrate from Mocha to Jest

What is the current behavior?

Tests are run using Mocha

What is the new behavior?

Tests are run using Jest

Checklist:

  • Tests

Update package.json devDependencies:

```diff
+jest
-mocha
-nyc
```

Update package.json scripts and remove `test:coverage:report`

Run `jest-codemods` (https://jestjs.io/docs/en/migration-guide):

```sh
jscodeshift -t jest-codemods/dist/transformers/mocha.js . --ignore-pattern node_modules --parser babel
```

Rename files under `test` directory

Update eslint, husky, travis, and tsconfig
This brings test coverage back to 100%
`npm run test:ci` passes option `--ci` to `npm test`, which fails
the test if a new snapshot is encountered.
@remarkablemark remarkablemark merged commit 3a2f26e into master Jun 15, 2020
@remarkablemark remarkablemark deleted the test/jest branch June 15, 2020 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant