mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 13:04:39 +02:00
Fix import defer test bugs
This commit is contained in:
parent
c3c318cf11
commit
eeacc18d05
@ -43,10 +43,11 @@ assert.compareArray(
|
||||
"Deferred namespaces' keys are the exports sorted alphabetically, followed by @@toStringTag"
|
||||
);
|
||||
|
||||
verifyProperty(ns, "foo", {
|
||||
value: 1,
|
||||
writable: true,
|
||||
enumerable: true,
|
||||
configurable: false,
|
||||
});
|
||||
// We cannot use `verifyProperty` because the property _looks_ writable, but it's actually not
|
||||
const desc = Reflect.getOwnPropertyDescriptor(ns, "foo");
|
||||
assert.sameValue(desc.value, 1, "The value of the 'foo' property is 1");
|
||||
assert.sameValue(desc.writable, true, "The 'foo' property is writable");
|
||||
assert.sameValue(desc.enumerable, true, "The 'foo' property is enumerable");
|
||||
assert.sameValue(desc.configurable, false, "The 'foo' property is not configurable");
|
||||
|
||||
assert.sameValue(Reflect.getOwnPropertyDescriptor(ns, "non-existent"), undefined, "No descriptors for non-exports");
|
||||
|
@ -37,6 +37,6 @@ features: [import-defer]
|
||||
|
||||
import defer * as ns from "./dep_FIXTURE.js";
|
||||
|
||||
assert(globalThis["error on ns.foo"] instanceof TypeError, "ns.foo while evaluating throws a TypeError");
|
||||
ns.x;
|
||||
|
||||
ns.foo;
|
||||
assert(globalThis["error on ns.foo"] instanceof TypeError, "ns.foo while evaluating throws a TypeError");
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2024 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
import defer * as ns from "./import-defer-throws_FIXTURE.js";
|
||||
import defer * as ns from "./throws_FIXTURE.js";
|
||||
export { ns };
|
||||
|
@ -63,8 +63,7 @@ assert.compareArray(globalThis.evaluations, [
|
||||
"2.1.1 end",
|
||||
"2.2 end",
|
||||
"4.1 start",
|
||||
"4.1 end",
|
||||
"5"
|
||||
"4.1 end"
|
||||
]);
|
||||
|
||||
globalThis.evaluations = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user