forked from jestjs/jest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
toThrowMatchers-test.js.snap
187 lines (147 loc) · 6.59 KB
/
toThrowMatchers-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
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`.toThrow() error class did not throw at all 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrow([22m[32mtype[39m[2m)[22m
Expected the function to throw an error of type:
[32m\\"Err\\"[39m
But it didn't throw anything."
`;
exports[`.toThrow() error class threw, but class did not match 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrow([22m[32mtype[39m[2m)[22m
Expected the function to throw an error of type:
[32m\\"Err2\\"[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrow() error class threw, but should not have 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).not.toThrow([22m[32mtype[39m[2m)[22m
Expected the function not to throw an error of type:
[32m\\"Err\\"[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrow() invalid arguments 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).not.toThrow([22m[32mnumber[39m[2m)[22m
Unexpected argument passed.
Expected: [32m\\"string\\"[39m, [32m\\"Error (type)\\"[39m or [32m\\"regexp\\"[39m.
Got:
string: [32m\\"111\\"[39m"
`;
exports[`.toThrow() regexp did not throw at all 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrow([22m[32mregexp[39m[2m)[22m
Expected the function to throw an error matching:
[32m/apple/[39m
But it didn't throw anything."
`;
exports[`.toThrow() regexp threw, but message did not match 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrow([22m[32mregexp[39m[2m)[22m
Expected the function to throw an error matching:
[32m/banana/[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrow() regexp threw, but should not have 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).not.toThrow([22m[32mregexp[39m[2m)[22m
Expected the function not to throw an error matching:
[32m/apple/[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrow() strings did not throw at all 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrow([22m[32mstring[39m[2m)[22m
Expected the function to throw an error matching:
[32m\\"apple\\"[39m
But it didn't throw anything."
`;
exports[`.toThrow() strings threw, but message did not match 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrow([22m[32mstring[39m[2m)[22m
Expected the function to throw an error matching:
[32m\\"banana\\"[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrow() strings threw, but should not have 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).not.toThrow([22m[32mstring[39m[2m)[22m
Expected the function not to throw an error matching:
[32m\\"apple\\"[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrowError() error class did not throw at all 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrowError([22m[32mtype[39m[2m)[22m
Expected the function to throw an error of type:
[32m\\"Err\\"[39m
But it didn't throw anything."
`;
exports[`.toThrowError() error class threw, but class did not match 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrowError([22m[32mtype[39m[2m)[22m
Expected the function to throw an error of type:
[32m\\"Err2\\"[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrowError() error class threw, but should not have 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).not.toThrowError([22m[32mtype[39m[2m)[22m
Expected the function not to throw an error of type:
[32m\\"Err\\"[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrowError() invalid arguments 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).not.toThrowError([22m[32mnumber[39m[2m)[22m
Unexpected argument passed.
Expected: [32m\\"string\\"[39m, [32m\\"Error (type)\\"[39m or [32m\\"regexp\\"[39m.
Got:
string: [32m\\"111\\"[39m"
`;
exports[`.toThrowError() regexp did not throw at all 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrowError([22m[32mregexp[39m[2m)[22m
Expected the function to throw an error matching:
[32m/apple/[39m
But it didn't throw anything."
`;
exports[`.toThrowError() regexp threw, but message did not match 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrowError([22m[32mregexp[39m[2m)[22m
Expected the function to throw an error matching:
[32m/banana/[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrowError() regexp threw, but should not have 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).not.toThrowError([22m[32mregexp[39m[2m)[22m
Expected the function not to throw an error matching:
[32m/apple/[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrowError() strings did not throw at all 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrowError([22m[32mstring[39m[2m)[22m
Expected the function to throw an error matching:
[32m\\"apple\\"[39m
But it didn't throw anything."
`;
exports[`.toThrowError() strings threw, but message did not match 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).toThrowError([22m[32mstring[39m[2m)[22m
Expected the function to throw an error matching:
[32m\\"banana\\"[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;
exports[`.toThrowError() strings threw, but should not have 1`] = `
"[2mexpect([22m[31mfunction[39m[2m).not.toThrowError([22m[32mstring[39m[2m)[22m
Expected the function not to throw an error matching:
[32m\\"apple\\"[39m
Instead, it threw:
[31m Error
[2mat jestExpect ([22mpackages/jest-matchers/src/__tests__/toThrowMatchers-test.js[2m:24:74)[22m[39m"
`;