Skip to content

test: migrate from mocha to jest#164

Merged
remarkablemark merged 11 commits intomasterfrom
test/jest
Jun 15, 2020
Merged

test: migrate from mocha to jest#164
remarkablemark merged 11 commits intomasterfrom
test/jest

Conversation

@remarkablemark
Copy link
Copy Markdown
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