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
|
Rev | Line | |
---|
[d565449] | 1 | 'use strict';
|
---|
| 2 |
|
---|
| 3 | require('../auto');
|
---|
| 4 |
|
---|
| 5 | var test = require('tape');
|
---|
| 6 | var defineProperties = require('define-properties');
|
---|
| 7 | var isEnumerable = Object.prototype.propertyIsEnumerable;
|
---|
| 8 |
|
---|
| 9 | var runTests = require('./tests');
|
---|
| 10 |
|
---|
| 11 | test('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.