refactor start
This commit is contained in:
parent
bd49791e06
commit
e46d25f0b7
16699 changed files with 2 additions and 1484887 deletions
26
home/ags/node_modules/is-weakref/test/index.js
generated
vendored
26
home/ags/node_modules/is-weakref/test/index.js
generated
vendored
|
|
@ -1,26 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var inspect = require('object-inspect');
|
||||
var forEach = require('for-each');
|
||||
|
||||
var isWeakRef = require('..');
|
||||
|
||||
test('isWeakRef', function (t) {
|
||||
t.equal(typeof isWeakRef, 'function', 'is a function');
|
||||
|
||||
var nonWeakRefs = [undefined, null, true, false, 42, 0, Infinity, NaN, /a/g, function () {}, {}, []];
|
||||
forEach(nonWeakRefs, function (nonWeakRef) {
|
||||
t.equal(isWeakRef(nonWeakRef), false, inspect(nonWeakRef) + ' is not a WeakRef');
|
||||
});
|
||||
|
||||
t.test('actual WeakRefs', { skip: typeof WeakRef === 'undefined' }, function (st) {
|
||||
var ref = new WeakRef({});
|
||||
|
||||
st.equal(isWeakRef(ref), true, inspect(ref) + ' is a WeakRef');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue