mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
Fix running multiple mocha tests in the same process (#4004)
This commit is contained in:
@@ -22,7 +22,7 @@ Blockly.setLocale = function (locale) {
|
||||
|
||||
// Override textToDomDocument and provide Node.js alternatives to DOMParser and
|
||||
// XMLSerializer.
|
||||
if (typeof Blockly.utils.global.DOMParser !== 'function') {
|
||||
if (typeof Blockly.utils.global.document !== 'object') {
|
||||
Blockly.utils.global.DOMParser = require("jsdom/lib/jsdom/living").DOMParser;
|
||||
Blockly.utils.global.XMLSerializer = require("jsdom/lib/jsdom/living").XMLSerializer;
|
||||
var doc = Blockly.utils.xml.textToDomDocument(
|
||||
|
||||
Reference in New Issue
Block a user