-
Notifications
You must be signed in to change notification settings - Fork 10.3k
/
index.ts.snap
175 lines (167 loc) · 4.84 KB
/
index.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
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`report.error handles "Array of Errors" signature correctly 1`] = `
Object {
"category": "UNKNOWN",
"context": Object {
"sourceMessage": "Message 3 from new Error",
},
"docsUrl": "https://gatsby.dev/issue-how-to",
"error": [Error: Message 3 from new Error],
"level": "ERROR",
"stack": Any<Array>,
"text": "Message 3 from new Error",
"type": "UNKNOWN",
}
`;
exports[`report.error handles "Error" signature correctly 1`] = `
Object {
"category": "UNKNOWN",
"context": Object {
"sourceMessage": "Message from new Error",
},
"docsUrl": "https://gatsby.dev/issue-how-to",
"error": [Error: Message from new Error],
"level": "ERROR",
"stack": Any<Array>,
"text": "Message from new Error",
"type": "UNKNOWN",
}
`;
exports[`report.error handles "String" signature correctly 1`] = `
Object {
"category": "UNKNOWN",
"context": Object {
"sourceMessage": "Error created in Jest",
},
"docsUrl": "https://gatsby.dev/issue-how-to",
"level": "ERROR",
"stack": Array [],
"text": "Error created in Jest",
"type": "UNKNOWN",
}
`;
exports[`report.error handles "String, Error" signature correctly 1`] = `
Object {
"category": "UNKNOWN",
"context": Object {
"sourceMessage": "Error string passed to reporter Message from new Error",
},
"docsUrl": "https://gatsby.dev/issue-how-to",
"error": [Error: Message from new Error],
"level": "ERROR",
"stack": Any<Array>,
"text": "Error string passed to reporter Message from new Error",
"type": "UNKNOWN",
}
`;
exports[`report.error handles "String, Error, pluginName" signature correctly 1`] = `
Object {
"category": "UNKNOWN",
"context": Object {
"sourceMessage": "Error string passed to reporter Message from new Error",
},
"docsUrl": "https://gatsby.dev/issue-how-to",
"error": [Error: Message from new Error],
"level": "ERROR",
"pluginName": "gatsby-plugin-foo-bar",
"stack": Array [
Object {
"columnNumber": 7,
"fileName": "<PROJECT_ROOT>/packages/gatsby-cli/src/reporter/__tests__/index.ts",
"functionName": null,
"lineNumber": 100,
},
Object {
"columnNumber": 28,
"fileName": "<PROJECT_ROOT>/node_modules/jest-circus/build/utils.js",
"functionName": "Promise.then.completed",
"lineNumber": 391,
},
Object {
"columnNumber": 10,
"fileName": "<PROJECT_ROOT>/node_modules/jest-circus/build/utils.js",
"functionName": "callAsyncCircusFn",
"lineNumber": 316,
},
Object {
"columnNumber": 40,
"fileName": "<PROJECT_ROOT>/node_modules/jest-circus/build/run.js",
"functionName": "_callCircusTest",
"lineNumber": 218,
},
Object {
"columnNumber": 3,
"fileName": "<PROJECT_ROOT>/node_modules/jest-circus/build/run.js",
"functionName": "_runTest",
"lineNumber": 155,
},
Object {
"columnNumber": 9,
"fileName": "<PROJECT_ROOT>/node_modules/jest-circus/build/run.js",
"functionName": "_runTestsForDescribeBlock",
"lineNumber": 66,
},
Object {
"columnNumber": 9,
"fileName": "<PROJECT_ROOT>/node_modules/jest-circus/build/run.js",
"functionName": "_runTestsForDescribeBlock",
"lineNumber": 60,
},
Object {
"columnNumber": 3,
"fileName": "<PROJECT_ROOT>/node_modules/jest-circus/build/run.js",
"functionName": "run",
"lineNumber": 25,
},
Object {
"columnNumber": 21,
"fileName": "<PROJECT_ROOT>/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js",
"functionName": "runAndTransformResultsToJestFormat",
"lineNumber": 170,
},
],
"text": "Error string passed to reporter Message from new Error",
"type": "UNKNOWN",
}
`;
exports[`report.error handles "structuredError" signature correctly 1`] = `
Object {
"category": "USER",
"code": "95312",
"context": Object {
"undefinedGlobal": "navigator",
},
"docsUrl": "https://gatsby.dev/debug-html",
"level": "ERROR",
"stack": Array [],
"text": "\\"navigator\\" is not available during server-side rendering. Enable \\"DEV_SSR\\" to debug this during \\"gatsby develop\\".",
"type": "HTML.COMPILATION",
}
`;
exports[`report.error uses custom error from errorMap 1`] = `
Object {
"code": "1337",
"context": Object {
"someProp": "test123",
},
"docsUrl": "https://www.gatsbyjs.com/docs/gatsby-cli/#new",
"level": "ERROR",
"stack": Array [],
"text": "Error text is test123",
"type": "PLUGIN",
}
`;
exports[`report.error uses custom error from errorMap with pluginName 1`] = `
Object {
"code": "gatsby-plugin-foo-bar_1337",
"context": Object {
"someProp": "test123",
},
"docsUrl": "https://www.gatsbyjs.com/docs/gatsby-cli/#new",
"level": "ERROR",
"pluginName": "gatsby-plugin-foo-bar",
"stack": Array [],
"text": "Error text is test123",
"type": "PLUGIN",
}
`;