/
test-helpers.test.ts.snap
63 lines (49 loc) · 2.47 KB
/
test-helpers.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
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`test-helpers 1`] = `
× jest --no-cache
↳ exit code: 1
===[ STDOUT ]===================================================================
===[ STDERR ]===================================================================
PASS ./pass.spec.ts
FAIL ./fail.spec.ts
● Test suite failed to run
TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
fail.spec.ts:7:22 - error TS2554: Expected 0 arguments, but got 1.
7 expect(mocked(foo)('hello')).toBeUndefined()
~~~~~~~
fail.spec.ts:9:46 - error TS2345: Argument of type '42' is not assignable to parameter of type 'string'.
9 expect(mocked(bar, true).dummy.deep.deeper(42)).toBeUndefined()
~~
ts-jest[root] (WARN) The \`mocked\` helper has been moved to \`ts-jest/utils\`. Use \`import { mocked } from 'ts-jest/utils'\` instead.
PASS ./deprecated.spec.ts
Test Suites: 1 failed, 2 passed, 3 total
Tests: 4 passed, 4 total
Snapshots: 0 total
Time: XXs
Ran all test suites.
================================================================================
`;
exports[`with esModuleInterop set to false 1`] = `
× jest --no-cache
↳ exit code: 1
===[ STDOUT ]===================================================================
===[ STDERR ]===================================================================
PASS ./pass.spec.ts
FAIL ./fail.spec.ts
● Test suite failed to run
TypeScript diagnostics (customize using \`[jest-config].globals.ts-jest.diagnostics\` option):
fail.spec.ts:7:22 - error TS2554: Expected 0 arguments, but got 1.
7 expect(mocked(foo)('hello')).toBeUndefined()
~~~~~~~
fail.spec.ts:9:46 - error TS2345: Argument of type '42' is not assignable to parameter of type 'string'.
9 expect(mocked(bar, true).dummy.deep.deeper(42)).toBeUndefined()
~~
ts-jest[root] (WARN) The \`mocked\` helper has been moved to \`ts-jest/utils\`. Use \`import { mocked } from 'ts-jest/utils'\` instead.
PASS ./deprecated.spec.ts
Test Suites: 1 failed, 2 passed, 3 total
Tests: 4 passed, 4 total
Snapshots: 0 total
Time: XXs
Ran all test suites.
================================================================================
`;