Skip to content

Commit 3c96e7f

Browse files
committed
generalize the error message
1 parent 53ec1bf commit 3c96e7f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: src/helpers.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ function getDocument() {
4646
}
4747
return window.document
4848
}
49-
5049
function getWindowFromNode(node) {
5150
// istanbul ignore next I'm not sure what could cause the final else so we'll leave it uncovered.
5251
if (node.defaultView) {
@@ -61,7 +60,7 @@ function getWindowFromNode(node) {
6160
} else {
6261
// no idea...
6362
throw new Error(
64-
`Unable to find the "window" object for the given node. fireEvent currently supports firing events on DOM nodes, document, and window. Please file an issue with the code that's causing you to see this error: https://github.com/testing-library/dom-testing-library/issues/new`,
63+
`Unable to find the "window" object for the given node. Please file an issue with the code that's causing you to see this error: https://github.com/testing-library/dom-testing-library/issues/new`,
6564
)
6665
}
6766
}

0 commit comments

Comments
 (0)