-
Notifications
You must be signed in to change notification settings - Fork 0
/
isSet.test.ts
121 lines (101 loc) · 3.18 KB
/
isSet.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/**
* ❌: The expectation should be equal to false
* ✅: The expectation should be equal to true
* ➖: The expectation can be equal to true or false
*/
import { describe, it, expect } from 'vitest';
import values from '../__Fixtures/values.js';
import isSet from '../../src/isSet.js';
const KEY = 'sets';
describe('is/isSet', () => {
it(`❌ nil !== ${KEY}`, () => {
values.nil.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ booleans !== ${KEY}`, () => {
values.booleans.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ integers !== ${KEY}`, () => {
values.integers.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ floats !== ${KEY}`, () => {
values.floats.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ numbers !== ${KEY}`, () => {
values.numbers.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ bigInts !== ${KEY}`, () => {
values.bigInts.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ strings !== ${KEY}`, () => {
values.strings.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ symbols !== ${KEY}`, () => {
values.symbols.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ arrays !== ${KEY}`, () => {
values.arrays.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ DOM elements !== ${KEY}`, () => {
values.elements.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ DOM nodeLists !== ${KEY}`, () => {
values.nodeLists.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ DOM alternative contexts !== ${KEY}`, () => {
values.alternativeDOMs.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ functions !== ${KEY}`, () => {
values.functions.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ classes !== ${KEY}`, () => {
values.classes.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ object constructors !== ${KEY}`, () => {
values.constructors.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`❌ invoked object constructors !== ${KEY}`, () => {
values.invokedConstructors.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
it(`➖ object instances !== || === ${KEY}`, () => {
values.instances.forEach((value) => {
expect(isSet(value)).toEqual(value.constructor === Set);
});
});
it(`❌ objects !== ${KEY}`, () => {
values.objects.forEach((value) => {
expect(isSet(value)).toEqual(false);
});
});
});