feat: add .isWeakRef

This commit is contained in:
eric_wang 2022-03-02 21:59:19 +08:00
parent 65ea91297e
commit 9d2121e436
5 changed files with 22 additions and 5 deletions

View file

@ -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
});
})();