@testing-library/dom
Advanced tools
Comparing version 8.11.2 to 8.11.3
@@ -48,2 +48,4 @@ "use strict"; | ||
return node.window; | ||
} else if (node.ownerDocument && node.ownerDocument.defaultView === null) { | ||
throw new Error(`It looks like the window object is not available for the provided node.`); | ||
} else if (node.then instanceof Function) { | ||
@@ -57,3 +59,3 @@ throw new Error(`It looks like you passed a Promise object instead of a DOM node. Did you do something like \`fireEvent.click(screen.findBy...\` when you meant to use a \`getBy\` query \`fireEvent.click(screen.getBy...\`, or await the findBy query \`fireEvent.click(await screen.findBy...\`?`); | ||
// The user passed something unusual to a calling function | ||
throw new Error(`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`); | ||
throw new Error(`The given node is not an Element, the node type is: ${typeof node}.`); | ||
} | ||
@@ -60,0 +62,0 @@ } |
{ | ||
"name": "@testing-library/dom", | ||
"version": "8.11.2", | ||
"version": "8.11.3", | ||
"description": "Simple and complete DOM testing utilities that encourage good testing practices.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2394085
22020