-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
/
Copy pathfailures.test.js.snap
320 lines (223 loc) · 6.53 KB
/
failures.test.js.snap
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`not throwing Error objects 1`] = `
"FAIL __tests__/throw_number.test.js
● Test suite failed to run
Expected an Error, but \\"1\\" was thrown
"
`;
exports[`not throwing Error objects 2`] = `
"FAIL __tests__/throw_string.test.js
● Test suite failed to run
Error
banana
"
`;
exports[`not throwing Error objects 3`] = `
"FAIL __tests__/throw_object.test.js
● Test suite failed to run
Error: No message was provided
"
`;
exports[`not throwing Error objects 4`] = `
"FAIL __tests__/assertion_count.test.js
.assertions()
✕ throws
✕ throws on redeclare of assertion count
✕ throws on assertion
.hasAssertions()
✕ throws when there are not assertions
● .assertions() › throws
expect(received).toBeTruthy()
Expected value to be truthy, instead received
false
at __tests__/assertion_count.test.js:13:17
● .assertions() › throws
expect.assertions(2)
Expected two assertions to be called but received one assertion call.
● .assertions() › throws on redeclare of assertion count
expect(received).toBeTruthy()
Expected value to be truthy, instead received
false
at __tests__/assertion_count.test.js:17:17
● .assertions() › throws on assertion
expect.assertions(0)
Expected zero assertions to be called but received one assertion call.
● .hasAssertions() › throws when there are not assertions
expect.hasAssertions()
Expected at least one assertion to be called but received none.
"
`;
exports[`works with node assert 1`] = `
"FAIL __tests__/node_assertion_error.test.js
✕ assert
✕ assert with a message
✕ assert.ok
✕ assert.ok with a message
✕ assert.equal
✕ assert.notEqual
✕ assert.deepEqual
✕ assert.deepEqual with a message
✕ assert.notDeepEqual
✕ assert.strictEqual
✕ assert.notStrictEqual
✕ assert.deepStrictEqual
✕ assert.notDeepStrictEqual
✕ assert.ifError
✕ assert.doesNotThrow
✕ assert.throws
● assert
assert.equal(received, expected) or assert(received)
Expected value to be (operator: ==):
true
Received:
false
at __tests__/node_assertion_error.test.js:15:3
● assert with a message
assert.equal(received, expected) or assert(received)
Expected value to be (operator: ==):
true
Received:
false
Message:
this is a message
at __tests__/node_assertion_error.test.js:19:3
● assert.ok
assert.equal(received, expected) or assert(received)
Expected value to be (operator: ==):
true
Received:
false
at __tests__/node_assertion_error.test.js:23:10
● assert.ok with a message
assert.equal(received, expected) or assert(received)
Expected value to be (operator: ==):
true
Received:
false
Message:
this is a message
at __tests__/node_assertion_error.test.js:27:10
● assert.equal
assert.equal(received, expected) or assert(received)
Expected value to be (operator: ==):
2
Received:
1
at __tests__/node_assertion_error.test.js:31:10
● assert.notEqual
assert.notEqual(received, expected)
Expected value not to be (operator: !=):
1
Received:
1
Difference:
Compared values have no visual difference.
at __tests__/node_assertion_error.test.js:35:10
● assert.deepEqual
assert.deepEqual(received, expected)
Expected value to deeply equal to:
{\\"a\\": {\\"b\\": {\\"c\\": 6}}}
Received:
{\\"a\\": {\\"b\\": {\\"c\\": 5}}}
Difference:
- Expected
+ Received
Object {
\\"a\\": Object {
\\"b\\": Object {
- \\"c\\": 6,
+ \\"c\\": 5,
},
},
}
at __tests__/node_assertion_error.test.js:39:10
● assert.deepEqual with a message
assert.deepEqual(received, expected)
Expected value to deeply equal to:
{\\"a\\": {\\"b\\": {\\"c\\": 7}}}
Received:
{\\"a\\": {\\"b\\": {\\"c\\": 5}}}
Message:
this is a message
Difference:
- Expected
+ Received
Object {
\\"a\\": Object {
\\"b\\": Object {
- \\"c\\": 7,
+ \\"c\\": 5,
},
},
}
at __tests__/node_assertion_error.test.js:43:10
● assert.notDeepEqual
assert.notDeepEqual(received, expected)
Expected value not to deeply equal to:
{\\"a\\": 1}
Received:
{\\"a\\": 1}
Difference:
Compared values have no visual difference.
at __tests__/node_assertion_error.test.js:47:10
● assert.strictEqual
assert.strictEqual(received, expected)
Expected value to be (operator: ===):
NaN
Received:
1
at __tests__/node_assertion_error.test.js:51:10
● assert.notStrictEqual
assert.notStrictEqual(received, expected)
Expected value not to be (operator: !==):
1
Received:
1
Message:
My custom error message
Difference:
Compared values have no visual difference.
at __tests__/node_assertion_error.test.js:55:10
● assert.deepStrictEqual
assert.deepStrictEqual(received, expected)
Expected value to deeply and strictly equal to:
{\\"a\\": 2}
Received:
{\\"a\\": 1}
Difference:
- Expected
+ Received
Object {
- \\"a\\": 2,
+ \\"a\\": 1,
}
at __tests__/node_assertion_error.test.js:59:10
● assert.notDeepStrictEqual
assert.notDeepStrictEqual(received, expected)
Expected value not to deeply and strictly equal to:
{\\"a\\": 1}
Received:
{\\"a\\": 1}
Difference:
Compared values have no visual difference.
at __tests__/node_assertion_error.test.js:63:10
● assert.ifError
Error
1 thrown
● assert.doesNotThrow
assert.doesNotThrow(function)
Expected the function not to throw an error.
Instead, it threw:
[Error: err!]
Message:
Got unwanted exception.
at __tests__/node_assertion_error.test.js:71:10
● assert.throws
assert.throws(function)
Expected the function to throw an error.
But it didn't throw anything.
Message:
Missing expected exception.
at __tests__/node_assertion_error.test.js:77:10
"
`;