Mike Pennisi 3dc6d92970 Add tests for module namespace objects
Assert correct behavior of the own properties of module namespace
objects and the essential internal methods of module namespace exotic
objects.
2016-04-01 13:15:16 -04:00

25 lines
757 B
JavaScript

// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-module-namespace-exotic-objects-get-p-receiver
description: References observe the mutation of initialized bindings
info: |
[...]
12. Let targetEnvRec be targetEnv's EnvironmentRecord.
13. Return ? targetEnvRec.GetBindingValue(binding.[[BindingName]], true).
flags: [module]
---*/
import * as ns from './get-str-update.js';
export var local1 = 111;
var local2 = 222;
export { local2 as renamed };
export { local1 as indirect } from './get-str-update.js';
local1 = 333;
local2 = 444;
assert.sameValue(ns.local1, 333);
assert.sameValue(ns.renamed, 444);
assert.sameValue(ns.indirect, 333);