feat: add .isWeakRef
This commit is contained in:
parent
65ea91297e
commit
9d2121e436
5 changed files with 22 additions and 5 deletions
14
test/test.ts
14
test/test.ts
|
|
@ -335,6 +335,14 @@ const types = new Map<string, Test>([
|
|||
],
|
||||
typename: 'WeakSet'
|
||||
}],
|
||||
['weakRef', {
|
||||
is: is.weakRef,
|
||||
assert: assert.weakRef,
|
||||
fixtures: [
|
||||
new window.WeakRef({})
|
||||
],
|
||||
typename: 'WeakRef'
|
||||
}],
|
||||
['weakMap', {
|
||||
is: is.weakMap,
|
||||
assert: assert.weakMap,
|
||||
|
|
@ -792,6 +800,10 @@ test('is.weakSet', t => {
|
|||
testType(t, 'weakSet');
|
||||
});
|
||||
|
||||
test('is.weakRef', t => {
|
||||
testType(t, 'weakRef');
|
||||
});
|
||||
|
||||
test('is.int8Array', t => {
|
||||
testType(t, 'int8Array');
|
||||
});
|
||||
|
|
@ -1203,7 +1215,7 @@ test('is.arrayLike', t => {
|
|||
t.false(is.arrayLike(new Map()));
|
||||
|
||||
(function () {
|
||||
t.notThrows(() => {
|
||||
t.notThrows(function () {
|
||||
assert.arrayLike(arguments); // eslint-disable-line prefer-rest-params
|
||||
});
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue