@@ -45,9 +45,39 @@ tap.test('edge cases', function (tt) {
45
45
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
46
46
+ ' [... stack stripped ...]\n'
47
47
+ ' ...\n'
48
- + 'ok 5 0 strictEqual to -0\n'
49
- + 'ok 6 -0 strictEqual to 0\n'
50
- + 'not ok 7 0 notStrictEqual to -0\n'
48
+ + 'ok 5 0 looseEqual to -0\n'
49
+ + 'ok 6 -0 looseEqual to 0\n'
50
+ + 'not ok 7 0 notLooseEqual to -0\n'
51
+ + ' ---\n'
52
+ + ' operator: notDeepLooseEqual\n'
53
+ + ' expected: |-\n'
54
+ + ' -0\n'
55
+ + ' actual: |-\n'
56
+ + ' 0\n'
57
+ + ' at: Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
58
+ + ' stack: |-\n'
59
+ + ' Error: 0 notLooseEqual to -0\n'
60
+ + ' [... stack stripped ...]\n'
61
+ + ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
62
+ + ' [... stack stripped ...]\n'
63
+ + ' ...\n'
64
+ + 'not ok 8 -0 notLooseEqual to 0\n'
65
+ + ' ---\n'
66
+ + ' operator: notDeepLooseEqual\n'
67
+ + ' expected: |-\n'
68
+ + ' 0\n'
69
+ + ' actual: |-\n'
70
+ + ' -0\n'
71
+ + ' at: Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
72
+ + ' stack: |-\n'
73
+ + ' Error: -0 notLooseEqual to 0\n'
74
+ + ' [... stack stripped ...]\n'
75
+ + ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
76
+ + ' [... stack stripped ...]\n'
77
+ + ' ...\n'
78
+ + 'ok 9 0 strictEqual to -0\n'
79
+ + 'ok 10 -0 strictEqual to 0\n'
80
+ + 'not ok 11 0 notStrictEqual to -0\n'
51
81
+ ' ---\n'
52
82
+ ' operator: notEqual\n'
53
83
+ ' expected: |-\n'
@@ -61,7 +91,7 @@ tap.test('edge cases', function (tt) {
61
91
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
62
92
+ ' [... stack stripped ...]\n'
63
93
+ ' ...\n'
64
- + 'not ok 8 -0 notStrictEqual to 0\n'
94
+ + 'not ok 12 -0 notStrictEqual to 0\n'
65
95
+ ' ---\n'
66
96
+ ' operator: notEqual\n'
67
97
+ ' expected: |-\n'
@@ -75,9 +105,9 @@ tap.test('edge cases', function (tt) {
75
105
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
76
106
+ ' [... stack stripped ...]\n'
77
107
+ ' ...\n'
78
- + 'ok 9 0 deepLooseEqual to -0\n'
79
- + 'ok 10 -0 deepLooseEqual to 0\n'
80
- + 'not ok 11 0 notDeepLooseEqual to -0\n'
108
+ + 'ok 13 0 deepLooseEqual to -0\n'
109
+ + 'ok 14 -0 deepLooseEqual to 0\n'
110
+ + 'not ok 15 0 notDeepLooseEqual to -0\n'
81
111
+ ' ---\n'
82
112
+ ' operator: notDeepLooseEqual\n'
83
113
+ ' expected: |-\n'
@@ -91,7 +121,7 @@ tap.test('edge cases', function (tt) {
91
121
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
92
122
+ ' [... stack stripped ...]\n'
93
123
+ ' ...\n'
94
- + 'not ok 12 -0 notDeepLooseEqual to 0\n'
124
+ + 'not ok 16 -0 notDeepLooseEqual to 0\n'
95
125
+ ' ---\n'
96
126
+ ' operator: notDeepLooseEqual\n'
97
127
+ ' expected: |-\n'
@@ -105,7 +135,7 @@ tap.test('edge cases', function (tt) {
105
135
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
106
136
+ ' [... stack stripped ...]\n'
107
137
+ ' ...\n'
108
- + 'not ok 13 0 deepEqual to -0\n'
138
+ + 'not ok 17 0 deepEqual to -0\n'
109
139
+ ' ---\n'
110
140
+ ' operator: deepEqual\n'
111
141
+ ' expected: |-\n'
@@ -119,7 +149,7 @@ tap.test('edge cases', function (tt) {
119
149
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
120
150
+ ' [... stack stripped ...]\n'
121
151
+ ' ...\n'
122
- + 'not ok 14 -0 deepEqual to 0\n'
152
+ + 'not ok 18 -0 deepEqual to 0\n'
123
153
+ ' ---\n'
124
154
+ ' operator: deepEqual\n'
125
155
+ ' expected: |-\n'
@@ -133,10 +163,10 @@ tap.test('edge cases', function (tt) {
133
163
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
134
164
+ ' [... stack stripped ...]\n'
135
165
+ ' ...\n'
136
- + 'ok 15 0 notDeepEqual to -0\n'
137
- + 'ok 16 -0 notDeepEqual to 0\n'
166
+ + 'ok 19 0 notDeepEqual to -0\n'
167
+ + 'ok 20 -0 notDeepEqual to 0\n'
138
168
+ '# NaNs\n'
139
- + 'not ok 17 NaN equal to NaN\n'
169
+ + 'not ok 21 NaN equal to NaN\n'
140
170
+ ' ---\n'
141
171
+ ' operator: equal\n'
142
172
+ ' expected: NaN\n'
@@ -148,8 +178,21 @@ tap.test('edge cases', function (tt) {
148
178
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
149
179
+ ' [... stack stripped ...]\n'
150
180
+ ' ...\n'
151
- + 'ok 18 NaN notEqual to NaN\n'
152
- + 'not ok 19 NaN strictEqual to NaN\n'
181
+ + 'ok 22 NaN notEqual to NaN\n'
182
+ + 'not ok 23 NaN looseEqual to NaN\n'
183
+ + ' ---\n'
184
+ + ' operator: deepLooseEqual\n'
185
+ + ' expected: NaN\n'
186
+ + ' actual: NaN\n'
187
+ + ' at: Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
188
+ + ' stack: |-\n'
189
+ + ' Error: NaN looseEqual to NaN\n'
190
+ + ' [... stack stripped ...]\n'
191
+ + ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
192
+ + ' [... stack stripped ...]\n'
193
+ + ' ...\n'
194
+ + 'ok 24 NaN notLooseEqual to NaN\n'
195
+ + 'not ok 25 NaN strictEqual to NaN\n'
153
196
+ ' ---\n'
154
197
+ ' operator: equal\n'
155
198
+ ' expected: NaN\n'
@@ -161,8 +204,8 @@ tap.test('edge cases', function (tt) {
161
204
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
162
205
+ ' [... stack stripped ...]\n'
163
206
+ ' ...\n'
164
- + 'ok 20 NaN notStrictEqual to NaN\n'
165
- + 'not ok 21 NaN deepLooseEqual to NaN\n'
207
+ + 'ok 26 NaN notStrictEqual to NaN\n'
208
+ + 'not ok 27 NaN deepLooseEqual to NaN\n'
166
209
+ ' ---\n'
167
210
+ ' operator: deepLooseEqual\n'
168
211
+ ' expected: NaN\n'
@@ -174,9 +217,9 @@ tap.test('edge cases', function (tt) {
174
217
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
175
218
+ ' [... stack stripped ...]\n'
176
219
+ ' ...\n'
177
- + 'ok 22 NaN notDeepLooseEqual to NaN\n'
178
- + 'ok 23 NaN deepEqual to NaN\n'
179
- + 'not ok 24 NaN notDeepEqual to NaN\n'
220
+ + 'ok 28 NaN notDeepLooseEqual to NaN\n'
221
+ + 'ok 29 NaN deepEqual to NaN\n'
222
+ + 'not ok 30 NaN notDeepEqual to NaN\n'
180
223
+ ' ---\n'
181
224
+ ' operator: notDeepEqual\n'
182
225
+ ' expected: NaN\n'
@@ -188,10 +231,10 @@ tap.test('edge cases', function (tt) {
188
231
+ ' at Test.<anonymous> ($TEST/edge-cases.js:$LINE:$COL)\n'
189
232
+ ' [... stack stripped ...]\n'
190
233
+ ' ...\n'
191
- + '\n1..24 \n'
192
- + '# tests 24 \n'
193
- + '# pass 12 \n'
194
- + '# fail 12 \n'
234
+ + '\n1..30 \n'
235
+ + '# tests 30 \n'
236
+ + '# pass 15 \n'
237
+ + '# fail 15 \n'
195
238
) ;
196
239
} ) ) ;
197
240
@@ -201,6 +244,11 @@ tap.test('edge cases', function (tt) {
201
244
t . notEqual ( 0 , - 0 , '0 notEqual to -0' ) ;
202
245
t . notEqual ( - 0 , 0 , '-0 notEqual to 0' ) ;
203
246
247
+ t . looseEqual ( 0 , - 0 , '0 looseEqual to -0' ) ;
248
+ t . looseEqual ( - 0 , 0 , '-0 looseEqual to 0' ) ;
249
+ t . notLooseEqual ( 0 , - 0 , '0 notLooseEqual to -0' ) ;
250
+ t . notLooseEqual ( - 0 , 0 , '-0 notLooseEqual to 0' ) ;
251
+
204
252
t . strictEqual ( 0 , - 0 , '0 strictEqual to -0' ) ;
205
253
t . strictEqual ( - 0 , 0 , '-0 strictEqual to 0' ) ;
206
254
t . notStrictEqual ( 0 , - 0 , '0 notStrictEqual to -0' ) ;
@@ -223,6 +271,9 @@ tap.test('edge cases', function (tt) {
223
271
t . equal ( NaN , NaN , 'NaN equal to NaN' ) ;
224
272
t . notEqual ( NaN , NaN , 'NaN notEqual to NaN' ) ;
225
273
274
+ t . looseEqual ( NaN , NaN , 'NaN looseEqual to NaN' ) ;
275
+ t . notLooseEqual ( NaN , NaN , 'NaN notLooseEqual to NaN' ) ;
276
+
226
277
t . strictEqual ( NaN , NaN , 'NaN strictEqual to NaN' ) ;
227
278
t . notStrictEqual ( NaN , NaN , 'NaN notStrictEqual to NaN' ) ;
228
279
0 commit comments