-
Notifications
You must be signed in to change notification settings - Fork 91
Adding NamedNodeMap to global export #85
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adding NamedNodeMap to global export #85
Conversation
that object is expected to be in the global context when running jest test (for Axe checks)
|
||
let node = document.documentElement.firstElementChild; | ||
|
||
assert(typeof NamedNodeMap !== 'undefined', true, 'NamedNodeMap undefined in global export'); |
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.
My intention was to add a unit test related to the change here. I couldn't find similar checks for other exported objects but felt bad not adding something...
@@ -30,6 +30,7 @@ import {InputEvent} from './input-event.js'; | |||
import {ImageClass} from './image.js'; | |||
import {MutationObserverClass} from './mutation-observer.js'; | |||
import {NodeList} from './node-list.js'; | |||
import {NamedNodeMap} from './named-node-map.js'; |
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.
Do you mind moving this above the previous line? Just to preserve the alphabetical order, thanks!
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.
Of course, thanks for your feedback 👍
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.
Done
Thanks, beside one line to move, this looks good to me 👍 |
* Adding NamedNodeMap to global export
The reason for this PR is this error when running Axe tests in a React app,
using Jest with a linkedom environment:
And this is the axe test involved:
What happen is that
NamedNodeMap
, despite being in linkedom interface, wasn't available inwindow
, which is what this PR intend to change.