1// Flags: --experimental-shadow-realm 2'use strict'; 3 4require('../common'); 5const assert = require('assert'); 6 7// Validates we can construct ShadowRealm successfully. 8const shadowRealm = new ShadowRealm(); 9 10const getter = shadowRealm.evaluate('globalThis.realmValue = "inner"; () => globalThis.realmValue;'); 11assert.strictEqual(getter(), 'inner'); 12assert.strictEqual('realmValue' in globalThis, false); 13