diff --git a/test/built-ins/global/global-object.js b/test/built-ins/global/global-object.js new file mode 100644 index 00000000000..61d9ac913a0 --- /dev/null +++ b/test/built-ins/global/global-object.js @@ -0,0 +1,26 @@ +// Copyright (C) 2016 Jordan Harband. All rights reserved. +// 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 +author: Jordan Harband +includes: [propertyHelper.js] +---*/ + +assert.sameValue(this, global); +assert.sameValue(global.global, global); + +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); + +globalVariable = {}; +assert.sameValue(globalVariable, global.globalVariable); diff --git a/test/built-ins/global/property-descriptor.js b/test/built-ins/global/property-descriptor.js new file mode 100644 index 00000000000..653d8c63bc5 --- /dev/null +++ b/test/built-ins/global/property-descriptor.js @@ -0,0 +1,13 @@ +// Copyright (C) 2016 Jordan Harband. All rights reserved. +// 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 +author: Jordan Harband +includes: [propertyHelper.js] +---*/ + +verifyNotEnumerable(this, 'global'); +verifyWritable(this, 'global'); +verifyConfigurable(this, 'global');