source: trip-planner-front/node_modules/object-is/test/shimmed.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 802 bytes
RevLine 
[6a3a178]1'use strict';
2
3require('../auto');
4
5var runTests = require('./tests');
6
7var test = require('tape');
8var defineProperties = require('define-properties');
9var callBind = require('call-bind');
10var isEnumerable = Object.prototype.propertyIsEnumerable;
11var functionsHaveNames = require('functions-have-names')();
12
13test('shimmed', function (t) {
14 t.equal(Object.is.length, 2, 'Object.is has a length of 2');
15 t.test('Function name', { skip: !functionsHaveNames }, function (st) {
16 st.equal(Object.is.name, 'is', 'Object.is has name "is"');
17 st.end();
18 });
19
20 t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
21 et.equal(false, isEnumerable.call(Object, 'is'), 'Object.is is not enumerable');
22 et.end();
23 });
24
25 runTests(callBind(Object.is, Object), t);
26
27 t.end();
28});
Note: See TracBrowser for help on using the repository browser.