Skip to content

Commit 9df05b2

Browse files
committed
module: test load twice
1 parent dad2c9f commit 9df05b2

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

test/es6module/module-load-twice.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//-------------------------------------------------------------------------------------------------------
2+
// Copyright (C) Microsoft. All rights reserved.
3+
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4+
//-------------------------------------------------------------------------------------------------------
5+
6+
WScript.RegisterModuleSource('a.js', " ");
7+
WScript.LoadScriptFile('a.js');
8+
WScript.LoadScriptFile('a.js');
9+
WScript.RegisterModuleSource('b.js', "import * as foo from 'a.js'");
10+
WScript.LoadScriptFile('b.js', "module");
11+
WScript.LoadScriptFile('b.js', "module");
12+
print('pass');

test/es6module/rlexe.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,9 @@
141141
<tags>BugFix,exclude_sanitize_address</tags>
142142
</default>
143143
</test>
144+
<test>
145+
<default>
146+
<files>module-load-twice.js</files>
147+
</default>
148+
</test>
144149
</regress-exe>

0 commit comments

Comments
 (0)