source: imaps-frontend/node_modules/globalthis/test/native.js@ d565449

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
RevLine 
[d565449]1'use strict';
2
3var test = require('tape');
4var defineProperties = require('define-properties');
5var isEnumerable = Object.prototype.propertyIsEnumerable;
6
7var missing = {};
8var theGlobal = typeof globalThis === 'object' ? globalThis : missing;
9
10var runTests = require('./tests');
11
12test('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.