mirror of
https://github.com/hanzoai/jest.git
synced 2026-09-24 16:59:57 +00:00
224 lines
6.3 KiB
Plaintext
224 lines
6.3 KiB
Plaintext
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
|
|
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.
|
|
|
|
10 | // eslint-disable-next-line no-constant-condition
|
|
11 | if (true) {
|
|
> 12 | fail('The truth hurts!');
|
|
| ^
|
|
13 | }
|
|
14 | });
|
|
15 |
|
|
|
|
at Object.fail (__tests__/fail.test.js:12: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\`
|
|
|
|
10 | // eslint-disable-next-line no-constant-condition
|
|
11 | if (true) {
|
|
> 12 | pending('This test is pending.');
|
|
| ^
|
|
13 | }
|
|
14 | expect(false).toBe(true);
|
|
15 | });
|
|
|
|
at Object.pending (__tests__/pending.test.js:12: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)"
|
|
`;
|