mirror of https://github.com/tc39/test262.git
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_ ])
|
||||
- just notice that it does not check if the module is deferred
|
||||
|
||||
flags: [module]
|
||||
flags: [async, module]
|
||||
includes: [asyncHelpers.js]
|
||||
features: [import-defer]
|
||||
|
||||
negative:
|
||||
phase: resolution
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
import defer * as ns from "./resolution-error_FIXTURE.js";
|
||||
asyncTest(async () => {
|
||||
globalThis.evaluated = false;
|
||||
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…
Reference in New Issue