forked from jestjs/jest
/
errorOnDeprecated.test.ts.snap
223 lines (164 loc) · 6.25 KB
/
errorOnDeprecated.test.ts.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
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`defaultTimeoutInterval.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/defaultTimeoutInterval.test.js
✕ Default Timeout Interval
● Default Timeout Interval
Illegal usage of \`jasmine.DEFAULT_TIMEOUT_INTERVAL\`, prefer \`jest.setTimeout\`.
8 |
9 | test('Default Timeout Interval', () => {
> 10 | jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000;
| ^
11 | expect(true).toBe(true);
12 | });
13 |
at Object.<anonymous> (__tests__/defaultTimeoutInterval.test.js:10:35)"
`;
exports[`fail.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/fail.test.js
✕ fail
● fail
Illegal usage of global \`fail\`, prefer throwing an error, or the \`done.fail\` callback.
9 | test('fail', () => {
10 | if (true) {
> 11 | fail('The truth hurts!');
| ^
12 | }
13 | });
14 |
at Object.fail (__tests__/fail.test.js:11:5)"
`;
exports[`jasmine.addMatchers.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/jasmine.addMatchers.test.js
● Test suite failed to run
Illegal usage of \`jasmine.addMatchers\`, prefer \`expect.extends\`.
7 | 'use strict';
8 |
> 9 | jasmine.addMatchers({
| ^
10 | theSpanishInquisition: () => ({
11 | compare: (actual, expected) => ({
12 | message: 'Nobdy expects the Spanish Inquisition!',
at Object.addMatchers (__tests__/jasmine.addMatchers.test.js:9:9)"
`;
exports[`jasmine.any.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/jasmine.any.test.js
✕ jasmine.any
● jasmine.any
Illegal usage of \`jasmine.any\`, prefer \`expect.any\`.
8 |
9 | test('jasmine.any', () => {
> 10 | expect({name: 'Jessie'}).toEqual({name: jasmine.any(String)});
| ^
11 | });
12 |
at Object.any (__tests__/jasmine.any.test.js:10:51)"
`;
exports[`jasmine.anything.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/jasmine.anything.test.js
✕ jasmine.anything
● jasmine.anything
Illegal usage of \`jasmine.anything\`, prefer \`expect.anything\`.
8 |
9 | test('jasmine.anything', () => {
> 10 | expect({input: ['some', 'stuff']}).toEqual({input: jasmine.anything()});
| ^
11 | });
12 |
at Object.anything (__tests__/jasmine.anything.test.js:10:62)"
`;
exports[`jasmine.arrayContaining.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/jasmine.arrayContaining.test.js
✕ jasmine.arrayContaining
● jasmine.arrayContaining
Illegal usage of \`jasmine.arrayContaining\`, prefer \`expect.arrayContaining\`.
8 |
9 | test('jasmine.arrayContaining', () => {
> 10 | expect(['some', 'stuff']).toEqual(jasmine.arrayContaining(['stuff']));
| ^
11 | });
12 |
at Object.arrayContaining (__tests__/jasmine.arrayContaining.test.js:10:45)"
`;
exports[`jasmine.createSpy.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/jasmine.createSpy.test.js
✕ jasmine.createSpy
● jasmine.createSpy
Illegal usage of \`jasmine.createSpy\`, prefer \`jest.fn\`.
8 |
9 | test('jasmine.createSpy', () => {
> 10 | const mySpy = jasmine.createSpy();
| ^
11 | mySpy('hello?');
12 | expect(mySpy).toHaveBeenCalledWith('hello?');
13 | });
at Object.createSpy (__tests__/jasmine.createSpy.test.js:10:25)"
`;
exports[`jasmine.objectContaining.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/jasmine.objectContaining.test.js
✕ jasmine.objectContaining
● jasmine.objectContaining
Illegal usage of \`jasmine.objectContaining\`, prefer \`expect.objectContaining\`.
9 | test('jasmine.objectContaining', () => {
10 | expect({input: 'trash', output: 'trash'}).toEqual(
> 11 | jasmine.objectContaining({output: 'trash'}),
| ^
12 | );
13 | });
14 |
at Object.objectContaining (__tests__/jasmine.objectContaining.test.js:11:13)"
`;
exports[`jasmine.stringMatching.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/jasmine.stringMatching.test.js
✕ jasmine.stringMatching
● jasmine.stringMatching
Illegal usage of \`jasmine.stringMatching\`, prefer \`expect.stringMatching\`.
8 |
9 | test('jasmine.stringMatching', () => {
> 10 | expect('Greetings Earthling!').toEqual(jasmine.stringMatching(/^Greetings/));
| ^
11 | });
12 |
at Object.stringMatching (__tests__/jasmine.stringMatching.test.js:10:50)"
`;
exports[`pending.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/pending.test.js
✕ pending
● pending
Illegal usage of global \`pending\`, prefer explicitly skipping a test using \`test.skip\`
9 | test('pending', () => {
10 | if (true) {
> 11 | pending('This test is pending.');
| ^
12 | }
13 | expect(false).toBe(true);
14 | });
at Object.pending (__tests__/pending.test.js:11:5)"
`;
exports[`spyOn.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/spyOn.test.js
✕ spyOn
● spyOn
Illegal usage of global \`spyOn\`, prefer \`jest.spyOn\`.
13 |
14 | test('spyOn', () => {
> 15 | spyOn(subject, 'func').and.returnValue('bar');
| ^
16 | expect(subject.func()).toBe('bar');
17 | });
18 |
at Object.spyOn (__tests__/spyOn.test.js:15:3)"
`;
exports[`spyOnProperty.test.js errors in errorOnDeprecated mode 1`] = `
"FAIL __tests__/spyOnProperty.test.js
✕ spyOnProperty
● spyOnProperty
Illegal usage of global \`spyOnProperty\`, prefer \`jest.spyOn\`.
22 | };
23 |
> 24 | const spy = spyOnProperty(obj, 'method', 'get');
| ^
25 |
26 | obj.method();
27 |
at Object.spyOnProperty (__tests__/spyOnProperty.test.js:24:15)"
`;