We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e8ac311 + 67ce2b1 commit 5bbc163Copy full SHA for 5bbc163
packages/metascraper-readability/src/worker.js
@@ -11,9 +11,15 @@ const parseReader = reader => {
11
}
12
13
14
+const errorCapture =
15
+ process.env.NODE_ENV === 'test' ? 'tryAndCatch' : 'processLevel'
16
+
17
const getDocument = ({ url, html }) => {
18
const { Window } = require('happy-dom')
- const window = new Window({ url })
19
+ const window = new Window({
20
+ url,
21
+ settings: { errorCapture }
22
+ })
23
const document = window.document
24
document.write(html)
25
return document
0 commit comments