Skip to content

Commit

Permalink
add VirtualConsole to hide jsdom warning
Browse files Browse the repository at this point in the history
  • Loading branch information
peernohell committed Sep 2, 2020
1 parent 65523f7 commit 1727266
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/jsdom-node.js
Expand Up @@ -5,8 +5,9 @@
// Test DOMPurify + jsdom using Node.js (version 8 and up)
const createDOMPurify = require('../dist/purify.cjs');
const jsdom = require('jsdom');
const { JSDOM } = jsdom;
const { window } = new JSDOM(`<html><head></head><body><div id="qunit-fixture"></div></body></html>`, { runScripts: "dangerously" });
const { JSDOM, VirtualConsole } = jsdom;
const virtualConsole = new VirtualConsole();
const { window } = new JSDOM(`<html><head></head><body><div id="qunit-fixture"></div></body></html>`, { runScripts: "dangerously", virtualConsole });
require('jquery')(window);

const sanitizeTestSuite = require('./test-suite');
Expand Down

0 comments on commit 1727266

Please sign in to comment.