diff --git a/test/test.js b/test/test.js index 0661b57a2..28d42d221 100644 --- a/test/test.js +++ b/test/test.js @@ -467,31 +467,33 @@ lodashStable.attempt(function() { lodashStable.assign(realm, require('vm').runInNewContext([ '(function() {', - ' var root = this;', + ' var noop = function() {},', + ' root = this;', '', ' var object = {', " 'arguments': (function() { return arguments; }(1, 2, 3)),", " 'array': [1, 2, 3],", - " 'arrayBuffer': new (this.ArrayByffer || Object),", + " 'arrayBuffer': new (root.ArrayBuffer || noop),", " 'boolean': Object(false),", " 'date': new Date,", " 'errors': [new Error, new EvalError, new RangeError, new ReferenceError, new SyntaxError, new TypeError, new URIError],", - " 'function': function() {},", - " 'map': new (root.Map || Object),", + " 'function': noop,", + " 'map': new (root.Map || noop),", " 'nan': NaN,", " 'null': null,", " 'number': Object(0),", " 'object': { 'a': 1, 'b': 2, 'c': 3 },", " 'regexp': /x/,", - " 'set': new (root.Set || Object),", + " 'set': new (root.Set || noop),", " 'string': Object('a'),", + " 'symbol': Object((root.Symbol || noop)()),", " 'undefined': undefined", ' };', '', " ['" + typedArrays.join("', '") + "'].forEach(function(type) {", " var Ctor = root[type]", ' if (Ctor) {', - " object['_' + type.toLowerCase()] = new Ctor(new ArrayBuffer(24));", + " object[type.toLowerCase()] = new Ctor(new ArrayBuffer(24));", ' }', " });", '', @@ -511,33 +513,35 @@ var idoc = (idoc = iframe.contentDocument || iframe.contentWindow).document || idoc; idoc.write([ '