/
messages.test.ts.snap
129 lines (97 loc) · 4.46 KB
/
messages.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
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`.formatExecError() 1`] = `
" <bold>● </intensity>Test suite failed to run
Whoops!
"
`;
exports[`codeframe 1`] = `
" <bold>● </intensity>Test suite failed to run
Whoops!
</><red><bold>></intensity></color><gray> 1 |</color> <cyan>throw</color> <cyan>new</color> <yellow>Error</color>(<green>"Whoops!"</color>)<yellow>;</color></>
</> <gray> |</color> <red><bold>^</intensity></color></>
<dim>at Object.<anonymous> (</intensity>file.js<dim>:1:7)</intensity>
"
`;
exports[`formatStackTrace does not print code frame when noCodeFrame = true 1`] = `
"
<dim>at Object.<anonymous> (</intensity>file.js<dim>:1:7)</intensity>
"
`;
exports[`formatStackTrace does not print codeframe when noStackTrace = true 1`] = `
"
<dim>at Object.<anonymous> (</intensity>file.js<dim>:1:7)</intensity>
"
`;
exports[`formatStackTrace prints code frame and stacktrace 1`] = `
"
</><red><bold>></intensity></color><gray> 1 |</color> <cyan>throw</color> <cyan>new</color> <yellow>Error</color>(<green>"Whoops!"</color>)<yellow>;</color></>
</> <gray> |</color> <red><bold>^</intensity></color></>
<dim>at Object.<anonymous> (</intensity>file.js<dim>:1:7)</intensity>
"
`;
exports[`formatStackTrace should strip node internals 1`] = `
"<bold><red> <bold>● </intensity><bold>Unix test</color></intensity>
Expected value to be of type:
"number"
Received:
""
type:
"string"
<dim></intensity>
<dim> <dim>at Object.it (</intensity><dim>__tests__/test.js<dim>:8:14)</intensity><dim></intensity>
"
`;
exports[`no codeframe 1`] = `
" <bold>● </intensity>Test suite failed to run
Whoops!
<dim>at Object.<anonymous> (</intensity>file.js<dim>:1:7)</intensity>
"
`;
exports[`no stack 1`] = `
" <bold>● </intensity>Test suite failed to run
Whoops!
"
`;
exports[`retains message in babel code frame error 1`] = `
"<bold><red> <bold>● </intensity><bold>Babel test</color></intensity>
packages/react/src/forwardRef.js: Unexpected token, expected , (20:10)
<dim></intensity>
<dim> </> <gray> 18 | </color> <cyan>false</color><yellow>,</color></intensity>
<dim> <gray> 19 | </color> <green>'forwardRef requires a render function but received a \`memo\` '</color></intensity>
<dim> <red><bold>></intensity><dim></color><gray> 20 | </color> <green>'component. Instead of forwardRef(memo(...)), use '</color> <yellow>+</color></intensity>
<dim> <gray> | </color> <red><bold>^</intensity><dim></color></intensity>
<dim> <gray> 21 | </color> <green>'memo(forwardRef(...)).'</color><yellow>,</color></intensity>
<dim> <gray> 22 | </color> )<yellow>;</color></intensity>
<dim> <gray> 23 | </color> } <cyan>else</color> <cyan>if</color> (<cyan>typeof</color> render <yellow>!==</color> <green>'function'</color>) {</></intensity>
"
`;
exports[`should exclude jasmine from stack trace for Unix paths. 1`] = `
"<bold><red> <bold>● </intensity><bold>Unix test</color></intensity>
at stack (../jest-jasmine2/build/jasmine-2.4.1.js:1580:17)
<dim></intensity>
<dim> <dim>at Object.addResult (</intensity><dim>../jest-jasmine2/build/jasmine-2.4.1.js<dim>:1550:14)</intensity><dim></intensity>
<dim> <dim>at Object.it (</intensity><dim>build/__tests__/messages-test.js<dim>:45:41)</intensity><dim></intensity>
"
`;
exports[`should not exclude vendor from stack trace 1`] = `
"<bold><red> <bold>● </intensity><bold>Vendor test</color></intensity>
Expected value to be of type:
"number"
Received:
""
type:
"string"
<dim></intensity>
<dim> <dim>at Object.it (</intensity><dim>__tests__/vendor/cool_test.js<dim>:6:666)</intensity><dim></intensity>
<dim> <dim>at Object.asyncFn (</intensity><dim>__tests__/vendor/sulu/node_modules/sulu-content-bundle/best_component.js<dim>:1:5)</intensity><dim></intensity>
"
`;
exports[`should return the error cause if there is one 1`] = `
" <bold>● </intensity>Test suite failed to run
Test exception
<dim>at Object.<anonymous> (</intensity>packages/jest-message-util/src/__tests__/messages.test.ts<dim>:418:17)</intensity>
Cause:
Cause Error
<dim>at Object.<anonymous> (</intensity>packages/jest-message-util/src/__tests__/messages.test.ts<dim>:421:17)</intensity>
"
`;