Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Switch from Ava to Jest #258

Merged
merged 1 commit into from
Apr 18, 2020
Merged

Switch from Ava to Jest #258

merged 1 commit into from
Apr 18, 2020

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Apr 12, 2020

Since:

  • Jest is used more elsewhere in the (webpack) community, so people are likely more familiar with it
  • Ava seems to make more breaking changes (which has meant we've fallen behind the latest version as-is) - including dropping Node 8 in v3
  • I find the Jest docs easier to follow
  • Neutrino is likely to switch to Jest (since it has to have it in the list of deps anyway, for the @neutrinojs/jest preset) and it doesn't make sense to have projects under the neutrinojs org using different test runners (it's going to confuse me)

Note: As part of this switch I've chosen not to enable jest-babel transformation of the ES Module usage in the test files (and instead converted them to CJS), since we can't use ESM in the webpack-chain source itself (unless we want a more complicated build/release process), and I think it's more consistent to just use CJS in all files until Node supports it natively (soon!).

The test assertion conversions were performed using the codemods here:
https://github.com/skovhus/jest-codemods
...other than a couple of issues in test/Config.js the automated migration worked flawlessly! :-)

Since:
* Jest is used more elsewhere in the community, so people are likely
  more familiar with it
* Ava seems to make more breaking changes (which has meant we've fallen
  behind the latest version as-is) - including dropping Node 8 in v3
* Jest has a few features that would be useful for us (eg snapshots)
* I find the Jest docs easier to follow
* Neutrino is likely to switch to Jest (since it has to have it in the
  list of deps anyway, for the `@neutrinojs/jest` preset) and it doesn't
  make sense to have projects under the `neutrinojs` org using differnet
  test runners (it's going to confuse me)
@edmorley edmorley self-assigned this Apr 12, 2020
@edmorley edmorley requested a review from a team April 12, 2020 13:25
@edmorley edmorley merged commit 83db406 into master Apr 18, 2020
@edmorley edmorley deleted the edmorley-switch-to-jest branch April 18, 2020 11:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants