forked from tc39/test262
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for @@toStringTag on deferred module namespaces
- Loading branch information
1 parent
ada0636
commit e5808ab
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
test/language/import/import-defer/deferred-namespace-object/to-string-tag.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}); |