diff --git a/test/test.js b/test/test.js index 037b597d2..7efdd1a6e 100644 --- a/test/test.js +++ b/test/test.js @@ -189,6 +189,15 @@ var xml = new ActiveXObject('Microsoft.XMLDOM'); } catch(e) {} + /** Poison the free variable `root` in Node.js */ + try { + Object.defineProperty(global.root, 'root', { + 'configurable': true, + 'enumerable': false, + 'get': function() { throw new ReferenceError; } + }); + } catch(e) {} + /** Use a single "load" function. */ var load = (!amd && typeof require == 'function') ? require