2016-09-28 19:53:50 +02:00
|
|
|
// Copyright (C) 2016 Jordan Harband. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
2018-07-26 02:11:53 +02:00
|
|
|
esid: sec-other-properties-of-the-global-object-globalthis
|
|
|
|
description: "'globalThis' should be the global object"
|
2016-09-28 19:53:50 +02:00
|
|
|
author: Jordan Harband
|
2018-07-26 02:11:53 +02:00
|
|
|
features: [globalThis]
|
2016-09-28 19:53:50 +02:00
|
|
|
---*/
|
|
|
|
|
2018-07-26 02:11:53 +02:00
|
|
|
assert.sameValue(this, globalThis);
|
|
|
|
assert.sameValue(globalThis.globalThis, globalThis);
|
2016-09-28 19:53:50 +02:00
|
|
|
|
2018-07-26 02:11:53 +02:00
|
|
|
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);
|
2016-09-28 19:53:50 +02:00
|
|
|
|
2017-02-07 17:10:56 +01:00
|
|
|
var globalVariable = {};
|
2018-07-26 02:11:53 +02:00
|
|
|
assert.sameValue(globalVariable, globalThis.globalVariable);
|