mirror of
https://github.com/tc39/test262.git
synced 2025-07-23 14:04:51 +02:00
Rename imported to namespace
This commit is contained in:
parent
1c119e323e
commit
ec1d7ccc6f
@ -2,7 +2,7 @@
|
||||
// Copyright (C) 2018 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
path: language/module-code/dynamic-import/module-namespace-object/await-
|
||||
path: language/module-code/dynamic-import/ns/await-
|
||||
name: value from await resolving
|
||||
esid: sec-finishdynamicimport
|
||||
info: |
|
||||
@ -73,7 +73,7 @@ flags: [async]
|
||||
---*/
|
||||
|
||||
async function fn() {
|
||||
const imported = await /*{ import }*/;
|
||||
const ns = await /*{ import }*/;
|
||||
|
||||
/*{ body }*/
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
// Copyright (C) 2018 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
path: language/module-code/dynamic-import/module-namespace-object/promise-then-
|
||||
path: language/module-code/dynamic-import/ns/promise-then-
|
||||
name: value from promise then
|
||||
esid: sec-finishdynamicimport
|
||||
info: |
|
||||
@ -72,7 +72,7 @@ features: [dynamic-import]
|
||||
flags: [async]
|
||||
---*/
|
||||
|
||||
/*{ import }*/.then(imported => {
|
||||
/*{ import }*/.then(ns => {
|
||||
|
||||
/*{ body }*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: Module namespace objects have a Symbol.toStringTag
|
||||
template: module-namespace-object
|
||||
template: namespace
|
||||
info: |
|
||||
@@toStringTag
|
||||
|
||||
@ -16,13 +16,13 @@ features: [Symbol.toStringTag]
|
||||
//- import
|
||||
import('./module-code_FIXTURE.js')
|
||||
//- body
|
||||
assert.sameValue(imported[Symbol.toStringTag], 'Module');
|
||||
assert.sameValue(ns[Symbol.toStringTag], 'Module');
|
||||
|
||||
// propertyHelper.js is not appropriate for this test because it assumes that
|
||||
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
|
||||
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
|
||||
// object does not.
|
||||
var desc = Object.getOwnPropertyDescriptor(imported, Symbol.toStringTag);
|
||||
var desc = Object.getOwnPropertyDescriptor(ns, Symbol.toStringTag);
|
||||
|
||||
assert.sameValue(desc.enumerable, false, 'reports as non-enumerable');
|
||||
assert.sameValue(desc.writable, false, 'reports as non-writable');
|
@ -2,11 +2,11 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: Module namespace objects are not extensible.
|
||||
template: module-namespace-object
|
||||
template: namespace
|
||||
includes: [propertyHelper.js]
|
||||
---*/
|
||||
|
||||
//- import
|
||||
import('./module-code_FIXTURE.js')
|
||||
//- body
|
||||
assert.sameValue(Object.isExtensible(imported), false);
|
||||
assert.sameValue(Object.isExtensible(ns), false);
|
@ -3,11 +3,11 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: Module namespace objects lack a Symbol.toStringTag
|
||||
template: module-namespace-object
|
||||
template: namespace
|
||||
features: [Symbol.iterator]
|
||||
---*/
|
||||
|
||||
//- import
|
||||
import('./module-code_FIXTURE.js')
|
||||
//- body
|
||||
assert.sameValue(Object.prototype.hasOwnProperty.call(imported, Symbol.iterator), false);
|
||||
assert.sameValue(Object.prototype.hasOwnProperty.call(ns, Symbol.iterator), false);
|
@ -2,7 +2,7 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: imported object properties descriptors
|
||||
template: module-namespace-object
|
||||
template: namespace
|
||||
---*/
|
||||
|
||||
//- import
|
||||
@ -12,21 +12,21 @@ import('./module-code_FIXTURE.js')
|
||||
// the object exposes the ordinary object's implementation of [[Get]], [[Set]],
|
||||
// [[Delete]], and [[OwnPropertyKeys]], which the module namespace exotic
|
||||
// object does not.
|
||||
var desc = Object.getOwnPropertyDescriptor(imported, 'default');
|
||||
var desc = Object.getOwnPropertyDescriptor(ns, 'default');
|
||||
|
||||
assert.sameValue(desc.value, 42, 'default value is 42');
|
||||
assert.sameValue(desc.enumerable, true, 'default reports as enumerable');
|
||||
assert.sameValue(desc.writable, true, 'default reports as writable');
|
||||
assert.sameValue(desc.configurable, false, 'default reports as non-configurable');
|
||||
|
||||
desc = Object.getOwnPropertyDescriptor(imported, 'x');
|
||||
desc = Object.getOwnPropertyDescriptor(ns, 'x');
|
||||
|
||||
assert.sameValue(desc.value, 'Test262', 'x value is "Test262"');
|
||||
assert.sameValue(desc.enumerable, true, 'x reports as enumerable');
|
||||
assert.sameValue(desc.writable, true, 'x reports as writable');
|
||||
assert.sameValue(desc.configurable, false, 'x reports as non-configurable');
|
||||
|
||||
desc = Object.getOwnPropertyDescriptor(imported, 'z');
|
||||
desc = Object.getOwnPropertyDescriptor(ns, 'z');
|
||||
|
||||
assert.sameValue(desc.value, 42, 'z value is 42');
|
||||
assert.sameValue(desc.enumerable, true, 'z reports as enumerable');
|
@ -2,10 +2,10 @@
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: Module namespace object prototype is null
|
||||
template: module-namespace-object
|
||||
template: namespace
|
||||
---*/
|
||||
|
||||
//- import
|
||||
import('./module-code_FIXTURE.js')
|
||||
//- body
|
||||
assert.sameValue(Object.getPrototypeOf(imported), null, 'prototype is null');
|
||||
assert.sameValue(Object.getPrototypeOf(ns), null, 'prototype is null');
|
Loading…
x
Reference in New Issue
Block a user