Skip to content

Commit

Permalink
generalize the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Mar 4, 2020
1 parent 53ec1bf commit 3c96e7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ function getDocument() {
}
return window.document
}

function getWindowFromNode(node) {
// istanbul ignore next I'm not sure what could cause the final else so we'll leave it uncovered.
if (node.defaultView) {
Expand All @@ -61,7 +60,7 @@ function getWindowFromNode(node) {
} else {
// no idea...
throw new Error(
`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`,
`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`,
)
}
}
Expand Down

0 comments on commit 3c96e7f

Please sign in to comment.