Skip to content

feat(breaking): upgrade to Jest 25 #110

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 5 commits into from
Feb 4, 2020

Conversation

greenkeeper[bot]
Copy link
Contributor

@greenkeeper greenkeeper bot commented Jan 22, 2020

There have been updates to the jest2 monorepo:

  • The dependency pretty-format was updated from 24.9.0 to 25.1.0.
  • The dependency jest-snapshot was updated from 24.9.0 to 25.1.0.
  • The dependency jest-diff was updated from 24.9.0 to 25.1.0.

These versions are not covered by your current version range.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

This monorepo update includes releases of one or more dependencies which all belong to the jest2 group definition.


Publisher: davidzilburg
License: MIT

Find out more about this release.


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper bot 🌴

Fixes #112

@thymikee thymikee changed the title Update jest2 to the latest version 🚀 feat(breaking): upgrade to Jest 25 Feb 4, 2020
@thymikee thymikee requested review from SimenB and pedrottimark and removed request for SimenB February 4, 2020 17:50
@thymikee thymikee merged commit d330f77 into master Feb 4, 2020
@thymikee thymikee deleted the greenkeeper/monorepo.jest2-20200122010853 branch February 4, 2020 17:53
@pedrottimark
Copy link

The breaking change in the snapshot files is to trim spaces in diff columns of empty lines:

Jest 24 Jest 25
'+ ' '+'
'- ' '-'
' ' ''

This avoids a possible unexpected hassle. Until I changed the settings in my code editor, it trimmed these spaces and messed up the snapshot criteria when I edited a snapshot file. Unrelated tests suddenly failed, and I had to update them to their original content before I committed the changes.

@thymikee
Copy link
Member

thymikee commented Feb 4, 2020

Yup, I like that change and it aligns nicely with major bump :)

@pedrottimark
Copy link

For the default colors: false option, new options in jest-diff can avoid need for strip-ansi

See https://www.npmjs.com/package/jest-diff#options

Here is pseudo code:

const noColor = val => val;

{
  aColor: noColor,
  bColor: noColor,
  changeColor: noColor,
  changeLineTrailingSpaceColor: noColor,
  commonColor: noColor,
  commonLineTrailingSpaceColor: noColor,
  patchColor: noColor,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Jest 25 support
2 participants