|
|
@@ -94,6 +94,32 @@ var tests = [
|
|
|
testRunner.LoadModule(start);
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "Issue 6261: Specifier dependent module load order",
|
|
|
+ body: function() {
|
|
|
+ WScript.RegisterModuleSource("dep", `export const obj = {a:false, b: false, c: false};`);
|
|
|
+ WScript.RegisterModuleSource("one",`
|
|
|
+ import {obj} from "dep";
|
|
|
+ assert.isFalse(obj.b);
|
|
|
+ assert.isFalse(obj.c);
|
|
|
+ assert.isFalse(obj.a);
|
|
|
+ obj.a = true;`);
|
|
|
+ WScript.RegisterModuleSource("two",`
|
|
|
+ import {obj} from "dep";
|
|
|
+ assert.isFalse(obj.b);
|
|
|
+ assert.isFalse(obj.c);
|
|
|
+ assert.isTrue(obj.a);
|
|
|
+ obj.b = true;`);
|
|
|
+ WScript.RegisterModuleSource("three",`
|
|
|
+ import {obj} from "dep";
|
|
|
+ assert.isTrue(obj.b);
|
|
|
+ assert.isFalse(obj.c);
|
|
|
+ assert.isTrue(obj.a);
|
|
|
+ obj.c = true;`);
|
|
|
+ const start = 'import "one"; import "two"; import "three";';
|
|
|
+ testRunner.LoadModule(start);
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
// https://github.com/Microsoft/ChakraCore/issues/5501
|
|
|
name : "Issue 5501: Indirect exports excluded from namespace object - POC 1",
|