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"
|
"Deferred namespaces' keys are the exports sorted alphabetically, followed by @@toStringTag"
|
||||||
);
|
);
|
||||||
|
|
||||||
verifyProperty(ns, "foo", {
|
// We cannot use `verifyProperty` because the property _looks_ writable, but it's actually not
|
||||||
value: 1,
|
const desc = Reflect.getOwnPropertyDescriptor(ns, "foo");
|
||||||
writable: true,
|
assert.sameValue(desc.value, 1, "The value of the 'foo' property is 1");
|
||||||
enumerable: true,
|
assert.sameValue(desc.writable, true, "The 'foo' property is writable");
|
||||||
configurable: false,
|
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");
|
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";
|
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.
|
// Copyright (C) 2024 Igalia, S.L. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// 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 };
|
export { ns };
|
||||||
|
@ -63,8 +63,7 @@ assert.compareArray(globalThis.evaluations, [
|
|||||||
"2.1.1 end",
|
"2.1.1 end",
|
||||||
"2.2 end",
|
"2.2 end",
|
||||||
"4.1 start",
|
"4.1 start",
|
||||||
"4.1 end",
|
"4.1 end"
|
||||||
"5"
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
globalThis.evaluations = [];
|
globalThis.evaluations = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user