-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathbug_OS17830745.js
26 lines (21 loc) · 1.07 KB
/
bug_OS17830745.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//-------------------------------------------------------------------------------------------------------
// Resolving module2 will result in error (can't find the module file).
// This causes us to mark module3 as having an error.
// Later we resolve module0 which parses correctly.
// This causes us to notify parents which will try to instantiate module3 because
// module0 did not have an error. However, module3 has children modules which were
// not parsed. That put module3 into error state, we should skip instantiating
// module3.
WScript.RegisterModuleSource('module0.js', `
console.log('fail');
`);
WScript.RegisterModuleSource('module3.js', `
import { default as _default } from 'module0.js';
export { } from 'module2.js';
console.log('fail');
`);
WScript.LoadScriptFile('module3.js', 'module');
console.log('pass');