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