Debian Codegraph @

globalthis/test/native.js

raw
1 'use strict';
2
3 var test = require('tape');
4 var defineProperties = require('define-properties');
5 var isEnumerable = Object.prototype.propertyIsEnumerable;
6
7 var runTests = require('./tests');
8
9 test('native', function (t) {
10 t.equal(typeof global, 'object', 'global is an object');
11 t.equal(global in global, true, 'global is in global');
12
13 t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
14 et.equal(false, isEnumerable.call(global, 'global'), 'global is not enumerable');
15 et.end();
16 });
17
18 runTests(global, t);
19
20 t.end();
21 });