test262/implementation-contributed/javascriptcore/stress/global-environment-does-not-trap-unscopables.js
Leo Balter d1261bb49d Update files for the curation process
Remove more stress tests with existing coverage or out of context for test262
2018-09-11 18:20:20 -04:00

21 lines
367 B
JavaScript

// Reviewed
function test(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var global = new Function('return this')();
var Cocoa = 'Cocoa';
global[Symbol.unscopables] = {
Cocoa: true
};
test(Cocoa, "Cocoa");
(function () {
var Cocoa = 'local'
with (global) {
test(Cocoa, "local");
}
}());