-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix(pretty-format): handles jsdom attributes properly #11189
Conversation
Deploy preview for jestjs ready! Built without sensitive environment variables with commit d9eee82 |
Co-authored-by: Simen Bekkhus <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #11189 +/- ##
==========================================
- Coverage 64.14% 64.14% -0.01%
==========================================
Files 307 307
Lines 13375 13379 +4
Branches 3260 3261 +1
==========================================
+ Hits 8580 8582 +2
- Misses 4089 4090 +1
- Partials 706 707 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand how AbortController plays into encountering this and thus why the test added is exactly the way it is, but either way catch
when calling unknown functions that could do anything is the right thing to do 👍
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
fixes #10770.
When received object mismatch with expected object, jest will copy received object with
deepCyclicCopyObject
.As for this issue, received object contains jsdom provided objects
AbortController
, and will encounterjsdom/lib/jsdom/living/attributes
.This module also contains
hasAttribute
,prettyFormat.plugins.DOMElement.test
will throw an exception by callinghasAttribute
.Test plan
added
handles jsdom attributes properly
test.