You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
802 B
29 lines
802 B
4 years ago
|
'use strict';
|
||
|
|
||
|
require('../auto');
|
||
|
|
||
|
var runTests = require('./tests');
|
||
|
|
||
|
var test = require('tape');
|
||
|
var defineProperties = require('define-properties');
|
||
|
var callBind = require('call-bind');
|
||
|
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||
|
var functionsHaveNames = require('functions-have-names')();
|
||
|
|
||
|
test('shimmed', function (t) {
|
||
|
t.equal(Object.is.length, 2, 'Object.is has a length of 2');
|
||
|
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
|
||
|
st.equal(Object.is.name, 'is', 'Object.is has name "is"');
|
||
|
st.end();
|
||
|
});
|
||
|
|
||
|
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
|
||
|
et.equal(false, isEnumerable.call(Object, 'is'), 'Object.is is not enumerable');
|
||
|
et.end();
|
||
|
});
|
||
|
|
||
|
runTests(callBind(Object.is, Object), t);
|
||
|
|
||
|
t.end();
|
||
|
});
|