You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: lib/index.js
+5-1
Original file line number
Diff line number
Diff line change
@@ -433,7 +433,11 @@ module.exports = {
433
433
htmlDocument.write(subject);
434
434
htmlDocument.close();
435
435
}else{
436
-
htmlDocument=require('jsdom').jsdom(subject);
436
+
try{
437
+
htmlDocument=require('jsdom').jsdom(subject);
438
+
}catch(err){
439
+
thrownewError('The assertion `when parsed as html` was run outside a browser, but could not find the `jsdom` module. Please npm install jsdom to make this work.');
0 commit comments