source: imaps-frontend/node_modules/globalthis/test/shimmed.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 900 bytes
Line 
1'use strict';
2
3require('../auto');
4
5var test = require('tape');
6var defineProperties = require('define-properties');
7var isEnumerable = Object.prototype.propertyIsEnumerable;
8
9var runTests = require('./tests');
10
11test('shimmed', function (t) {
12 t.equal(typeof globalThis, 'object', 'globalThis is an object');
13 t.equal('globalThis' in globalThis, true, 'globalThis is in globalThis');
14
15 t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
16 et.equal(false, isEnumerable.call(globalThis, 'globalThis'), 'globalThis.globalThis is not enumerable');
17 et.end();
18 });
19
20 t.test('writability', { skip: !defineProperties.supportsDescriptors }, function (wt) {
21 var desc = Object.getOwnPropertyDescriptor(globalThis, 'globalThis');
22 wt.equal(desc.writable, true, 'globalThis.globalThis is writable');
23 wt.end();
24 });
25
26 runTests(globalThis.globalThis, t);
27
28 t.end();
29});
Note: See TracBrowser for help on using the repository browser.