mirror of
https://github.com/tc39/test262.git
synced 2025-07-31 01:44:54 +02:00
Rewrite import defer resolution test ot not expect specific error
This commit is contained in:
parent
88ebb1e375
commit
2ad7f321d7
@ -9,14 +9,18 @@ info: |
|
|||||||
LoadRequestedModules ([ _hostDefined_ ])
|
LoadRequestedModules ([ _hostDefined_ ])
|
||||||
- just notice that it does not check if the module is deferred
|
- just notice that it does not check if the module is deferred
|
||||||
|
|
||||||
flags: [module]
|
flags: [async, module]
|
||||||
|
includes: [asyncHelpers.js]
|
||||||
features: [import-defer]
|
features: [import-defer]
|
||||||
|
|
||||||
negative:
|
|
||||||
phase: resolution
|
|
||||||
type: SyntaxError
|
|
||||||
---*/
|
---*/
|
||||||
|
|
||||||
$DONOTEVALUATE();
|
asyncTest(async () => {
|
||||||
|
globalThis.evaluated = false;
|
||||||
import defer * as ns from "./resolution-error_FIXTURE.js";
|
try {
|
||||||
|
await import("./main_FIXTURE.js");
|
||||||
|
} catch {
|
||||||
|
assert.sameValue(globalThis.evaluated, false, "The module should not be evaluated");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new Error("The module should throw");
|
||||||
|
})
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
|
|
||||||
|
import defer * as ns from "./resolution-error_FIXTURE.js";
|
||||||
|
|
||||||
|
globalThis.evaluated = true;
|
Loading…
x
Reference in New Issue
Block a user