Skip to content

chore: Bump jsdom to 15 #447

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 2 commits into from
Feb 10, 2020
Merged

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Feb 4, 2020

Not sure which version we should use. While the latest is 16 it isn't the default version used in jest. Ideally we would test with jsdom 15 and 16 just to be aware of changes between those versions.

What:

Bump used jsdom version to 15.2.1

Why:

jsdom 15 has MutationObserver support as well as perf improvements.

How:

  • fixing breaking changes in jest and jsodm

Checklist:

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 4, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5390825:

Sandbox Source
snowy-fire-812ei Configuration

},
]
`)
await expect(promise).resolves.toMatchSnapshot()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes

Jest: Multiple inline snapshots for the same call are not supported.

@codecov
Copy link

codecov bot commented Feb 4, 2020

Codecov Report

Merging #447 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #447   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          22     22           
  Lines         385    385           
  Branches       91     91           
=====================================
  Hits          385    385

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ee3e7a...5390825. Read the comment docs.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the snapshots are pretty much useless now. We'll need these tests to be rewritten to make sure they're testing what they should be. Maybe by making more explicit assertions on the mutation record.

@eps1lon
Copy link
Member Author

eps1lon commented Feb 6, 2020

@kentcdodds Will do. I didn't look closely what the purpose of the test was.

Should we leverage custom snapshot serializers or serialize them directly in the test?

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks!

@kentcdodds kentcdodds merged commit cf57dcd into testing-library:master Feb 10, 2020
@eps1lon eps1lon deleted the deps/bump-jsdom branch February 11, 2020 07:29
@kentcdodds
Copy link
Member

🎉 This PR is included in version 6.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants