Skip to content

Commit

Permalink
Add test for @@toStringTag on deferred module namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Dec 18, 2024
1 parent ada0636 commit e5808ab
Showing 1 changed file with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (C) 2024 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-getmodulenamespace
description: >
Deferred namespace objects have a "Deferred Module" @@toStringTag
info: |
ModuleNamespaceCreate ( _module_, _exports_, _phase_ )
1. ...
1. Let _M_ be MakeBasicObject(_internalSlotsList_).
1. ...
1. If _phase_ is ~defer~, then
1. ...
1. Let _toStringTag_ be *"Deferred Module"*.
1. Else,
1. ...
1. Create an own data property of _M_ named %Symbol.toStringTag% whose [[Value]]
is _toStringTag_ and whose [[Writable]], [[Enumerable]], and [[Configurable]]
attributes are false.
1. Return _M_.
flags: [module]
features: [import-defer]
includes: [propertyHelper.js]
---*/

import * as ns from "./dep_FIXTURE.js";

verifyProperty(ns, Symbol.toStringTag, {
value: "Deferred Module",
writable: false,
enumerable: false,
configurable: false,
});

0 comments on commit e5808ab

Please sign in to comment.