Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Original file line number Diff line number Diff line change
@@ -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 };
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down