mirror of https://github.com/tc39/test262.git
`global`: update property name
This commit is contained in:
parent
48d95ac3c4
commit
765de9136d
|
@ -103,7 +103,7 @@ Intl.Segmenter
|
|||
|
||||
# Global
|
||||
# https://github.com/tc39/proposal-global
|
||||
global
|
||||
globalThis
|
||||
|
||||
# `export * as namespace from module` consensus PR
|
||||
# https://github.com/tc39/ecma262/pull/1174
|
||||
|
|
|
@ -2,25 +2,25 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-other-properties-of-the-global-object-global
|
||||
description: "'global' should be the global object"
|
||||
esid: sec-other-properties-of-the-global-object-globalthis
|
||||
description: "'globalThis' should be the global object"
|
||||
author: Jordan Harband
|
||||
features: [global]
|
||||
features: [globalThis]
|
||||
---*/
|
||||
|
||||
assert.sameValue(this, global);
|
||||
assert.sameValue(global.global, global);
|
||||
assert.sameValue(this, globalThis);
|
||||
assert.sameValue(globalThis.globalThis, globalThis);
|
||||
|
||||
assert.sameValue(Array, global.Array);
|
||||
assert.sameValue(Boolean, global.Boolean);
|
||||
assert.sameValue(Date, global.Date);
|
||||
assert.sameValue(Error, global.Error);
|
||||
assert.sameValue(Function, global.Function);
|
||||
assert.sameValue(JSON, global.JSON);
|
||||
assert.sameValue(Math, global.Math);
|
||||
assert.sameValue(Number, global.Number);
|
||||
assert.sameValue(RegExp, global.RegExp);
|
||||
assert.sameValue(String, global.String);
|
||||
assert.sameValue(Array, globalThis.Array);
|
||||
assert.sameValue(Boolean, globalThis.Boolean);
|
||||
assert.sameValue(Date, globalThis.Date);
|
||||
assert.sameValue(Error, globalThis.Error);
|
||||
assert.sameValue(Function, globalThis.Function);
|
||||
assert.sameValue(JSON, globalThis.JSON);
|
||||
assert.sameValue(Math, globalThis.Math);
|
||||
assert.sameValue(Number, globalThis.Number);
|
||||
assert.sameValue(RegExp, globalThis.RegExp);
|
||||
assert.sameValue(String, globalThis.String);
|
||||
|
||||
var globalVariable = {};
|
||||
assert.sameValue(globalVariable, global.globalVariable);
|
||||
assert.sameValue(globalVariable, globalThis.globalVariable);
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-other-properties-of-the-global-object-global
|
||||
description: "'global' should be writable, non-enumerable, and configurable"
|
||||
esid: sec-other-properties-of-the-global-object-globalthis
|
||||
description: "'globalThis' should be writable, non-enumerable, and configurable"
|
||||
author: Jordan Harband
|
||||
includes: [propertyHelper.js]
|
||||
features: [global]
|
||||
features: [globalThis]
|
||||
---*/
|
||||
|
||||
verifyProperty(this, "global", {
|
||||
verifyProperty(this, "globalThis", {
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true,
|
||||
|
|
Loading…
Reference in New Issue