Skip to content

Upgrade Jest to version 24 (breaking changes)#13922

Merged
gziolo merged 7 commits intomasterfrom
update/jest-24-upgrade
Feb 24, 2019
Merged

Upgrade Jest to version 24 (breaking changes)#13922
gziolo merged 7 commits intomasterfrom
update/jest-24-upgrade

Conversation

@gziolo
Copy link
Copy Markdown
Member

@gziolo gziolo commented Feb 18, 2019

Description

The following changes were applied in this PR:

  • The bundled jest dependency has been updated from requiring ^23.6.0 to requiring ^24.1.0 (see Braking Changes.
  • The bundled jest-puppeteer dependency has been updated from requiring 3.2.1 to requiring ^4.0.0.
  • The bundled puppeteer dependency has been updated from requiring 1.6.1 to requiring ^1.12.2. - it looks like such upgrade on its own breaks our e2e tests ...
  • The bundled jest-enzyme dependency has been removed completely (it doesn't work with Jest 24 and we rather sunset support for Enzyme one day than continue to suffer keeping it up to date).
  • The bundled enzyme dependency has been updated from requiring ^3.7.0 to requiring ^3.9.0.
  • Removed babel-core dependency acting as Babel 7 bridge (no longer needed by Jest 24).

The biggest internal change caused by Jest upgrade was the need to replace usage of setupTestFrameworkScriptFile with setupFilesAfterEnv. Otherwise, as noted above, I had to remove jest-enzyme dependency and therefore update a few assertions which were using custom matchers.

There are 3 packages which were also updated but they weren't published to npm so far so I didn't update the corresponding changelog files:

  • jest-puppeteer-axe
  • e2e-test-utils
  • e2e-tests

How has this been tested?

npm test
npm run test-e2e

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

npm Packages Related to npm packages [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants