Deployed the page to Github Pages.
This commit is contained in:
parent
1d79754e93
commit
2c89899458
62797 changed files with 6551425 additions and 15279 deletions
12
node_modules/object-is/test/implementation.js
generated
vendored
Normal file
12
node_modules/object-is/test/implementation.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
var implementation = require('../implementation');
|
||||
var callBind = require('call-bind');
|
||||
var test = require('tape');
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('as a function', function (t) {
|
||||
runTests(callBind(implementation, Object), t);
|
||||
|
||||
t.end();
|
||||
});
|
12
node_modules/object-is/test/index.js
generated
vendored
Normal file
12
node_modules/object-is/test/index.js
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
'use strict';
|
||||
|
||||
var index = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('as a function', function (t) {
|
||||
runTests(index, t);
|
||||
|
||||
t.end();
|
||||
});
|
28
node_modules/object-is/test/shimmed.js
generated
vendored
Normal file
28
node_modules/object-is/test/shimmed.js
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
'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();
|
||||
});
|
57
node_modules/object-is/test/tests.js
generated
vendored
Normal file
57
node_modules/object-is/test/tests.js
generated
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
'use strict';
|
||||
|
||||
var hasSymbols = require('has-symbols')();
|
||||
|
||||
module.exports = function runTests(is, t) {
|
||||
t.test('works with primitives', function (st) {
|
||||
st.ok(is(), 'two absent args are the same');
|
||||
st.ok(is(undefined), 'undefined & one absent arg are the same');
|
||||
st.ok(is(undefined, undefined), 'undefined is undefined');
|
||||
st.ok(is(null, null), 'null is null');
|
||||
st.ok(is(true, true), 'true is true');
|
||||
st.ok(is(false, false), 'false is false');
|
||||
st.notOk(is(true, false), 'true is not false');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('works with NaN', function (st) {
|
||||
st.ok(is(NaN, NaN), 'NaN is NaN');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('differentiates zeroes', function (st) {
|
||||
st.ok(is(0, 0), '+0 is +0');
|
||||
st.ok(is(-0, -0), '-0 is -0');
|
||||
st.notOk(is(0, -0), '+0 is not -0');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('nonzero numbers', function (st) {
|
||||
st.ok(is(Infinity, Infinity), 'infinity is infinity');
|
||||
st.ok(is(-Infinity, -Infinity), 'infinity is infinity');
|
||||
st.ok(is(42, 42), '42 is 42');
|
||||
st.notOk(is(42, -42), '42 is not -42');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('strings', function (st) {
|
||||
st.ok(is('', ''), 'empty string is empty string');
|
||||
st.ok(is('foo', 'foo'), 'string is string');
|
||||
st.notOk(is('foo', 'bar'), 'string is not different string');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('objects', function (st) {
|
||||
var obj = {};
|
||||
st.ok(is(obj, obj), 'object is same object');
|
||||
st.notOk(is(obj, {}), 'object is not different object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('Symbols', { skip: !hasSymbols }, function (st) {
|
||||
st.ok(is(Symbol.iterator, Symbol.iterator), 'Symbol.iterator is itself');
|
||||
st.notOk(is(Symbol(), Symbol()), 'different Symbols are not equal');
|
||||
st.notOk(is(Symbol.iterator, Object(Symbol.iterator)), 'Symbol.iterator is not boxed form of itself');
|
||||
st.end();
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue