main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
767 bytes
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | var test = require('tape');
|
---|
| 4 | var defineProperties = require('define-properties');
|
---|
| 5 | var isEnumerable = Object.prototype.propertyIsEnumerable;
|
---|
| 6 |
|
---|
| 7 | var missing = {};
|
---|
| 8 | var theGlobal = typeof globalThis === 'object' ? globalThis : missing;
|
---|
| 9 |
|
---|
| 10 | var runTests = require('./tests');
|
---|
| 11 |
|
---|
| 12 | test('native', { todo: theGlobal === missing }, function (t) {
|
---|
| 13 | if (theGlobal !== missing) {
|
---|
| 14 | t.equal(typeof theGlobal, 'object', 'globalThis is an object');
|
---|
| 15 | t.equal('globalThis' in theGlobal, true, 'globalThis is in globalThis');
|
---|
| 16 |
|
---|
| 17 | t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
|
---|
| 18 | et.equal(false, isEnumerable.call(theGlobal, 'globalThis'), 'globalThis is not enumerable');
|
---|
| 19 | et.end();
|
---|
| 20 | });
|
---|
| 21 |
|
---|
| 22 | runTests(theGlobal, t);
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | t.end();
|
---|
| 26 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.