/
config-set.spec.ts.snap
256 lines (238 loc) · 8.17 KB
/
config-set.spec.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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`cacheKey should be a string 1`] = `"{\\"digest\\":\\"a0d51ca854194df8191d0e65c0ca4730f510f332\\",\\"jest\\":{\\"__backported\\":true,\\"globals\\":{}},\\"transformers\\":[\\"hoisting-jest-mock@1\\"],\\"tsJest\\":{\\"compiler\\":\\"typescript\\",\\"diagnostics\\":{\\"ignoreCodes\\":[6059,18002,18003],\\"pretty\\":true,\\"throws\\":true},\\"isolatedModules\\":false,\\"packageJson\\":{\\"kind\\":\\"file\\"},\\"transformers\\":{},\\"tsConfig\\":{\\"kind\\":\\"file\\",\\"value\\":\\"\\"}},\\"tsconfig\\":{\\"options\\":{\\"configFilePath\\":\\"\\",\\"declaration\\":false,\\"inlineSourceMap\\":false,\\"inlineSources\\":true,\\"module\\":1,\\"noEmit\\":false,\\"removeComments\\":false,\\"sourceMap\\":true,\\"target\\":1,\\"types\\":[]},\\"raw\\":{\\"compileOnSave\\":false,\\"compilerOptions\\":{\\"composite\\":true,\\"declaration\\":true,\\"types\\":[]},\\"exclude\\":[\\"foo/**/*\\"],\\"include\\":[\\"bar/**/*\\"]}}}"`;
exports[`isTestFile should return a boolean value whether the file matches test pattern 1`] = `true`;
exports[`isTestFile should return a boolean value whether the file matches test pattern 2`] = `true`;
exports[`isTestFile should return a boolean value whether the file matches test pattern 3`] = `true`;
exports[`isTestFile should return a boolean value whether the file matches test pattern 4`] = `true`;
exports[`jsonValue should create jsonValue based on each config and version 1`] = `
Object {
"babel": undefined,
"digest": "a0d51ca854194df8191d0e65c0ca4730f510f332",
"jest": Object {
"__backported": true,
"cacheDirectory": undefined,
"globals": Object {},
"name": undefined,
},
"transformers": Array [
"hoisting-jest-mock@1",
],
"tsJest": Object {
"babelConfig": undefined,
"compiler": "typescript",
"diagnostics": Object {
"ignoreCodes": Array [
6059,
18002,
18003,
],
"pretty": true,
"throws": true,
},
"isolatedModules": false,
"packageJson": Object {
"kind": "file",
"value": undefined,
},
"stringifyContentPathRegex": undefined,
"transformers": Object {},
"tsConfig": Object {
"kind": "file",
"value": "",
},
},
"tsconfig": Object {
"options": Object {
"configFilePath": "",
"declaration": false,
"inlineSourceMap": false,
"inlineSources": true,
"module": 1,
"noEmit": false,
"removeComments": false,
"sourceMap": true,
"target": 1,
"types": Array [],
},
"raw": Object {
"compileOnSave": false,
"compilerOptions": Object {
"composite": true,
"declaration": true,
"types": Array [],
},
"exclude": Array [
"foo/**/*",
],
"include": Array [
"bar/**/*",
],
},
},
}
`;
exports[`readTsConfig resolve configFileName normally module in tsConfig is not the same as forced module and allowSyntheticDefaultImports is false in tsConfig should use correct paths when searching 1`] = `
Array [
Object {
"category": 3,
"code": 151001,
"file": undefined,
"length": undefined,
"messageText": "If you have issues related to imports, you should consider setting \`esModuleInterop\` to \`true\` in your TypeScript configuration file (usually \`tsconfig.json\`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information.",
"start": undefined,
},
]
`;
exports[`readTsConfig resolve configFileName normally module in tsConfig is not the same as forced module and allowSyntheticDefaultImports is false in tsConfig should use given tsconfig path 1`] = `
Array [
Object {
"category": 3,
"code": 151001,
"file": undefined,
"length": undefined,
"messageText": "If you have issues related to imports, you should consider setting \`esModuleInterop\` to \`true\` in your TypeScript configuration file (usually \`tsconfig.json\`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information.",
"start": undefined,
},
]
`;
exports[`readTsConfig resolve configFileName normally module in tsConfig is not the same as forced module and esModuleInterop is not in tsConfig should use correct paths when searching 1`] = `
Array [
Object {
"category": 3,
"code": 151001,
"file": undefined,
"length": undefined,
"messageText": "If you have issues related to imports, you should consider setting \`esModuleInterop\` to \`true\` in your TypeScript configuration file (usually \`tsconfig.json\`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information.",
"start": undefined,
},
]
`;
exports[`readTsConfig resolve configFileName normally module in tsConfig is not the same as forced module and esModuleInterop is not in tsConfig should use given tsconfig path 1`] = `
Array [
Object {
"category": 3,
"code": 151001,
"file": undefined,
"length": undefined,
"messageText": "If you have issues related to imports, you should consider setting \`esModuleInterop\` to \`true\` in your TypeScript configuration file (usually \`tsconfig.json\`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information.",
"start": undefined,
},
]
`;
exports[`tsCustomTransformers should return an object containing all resolved transformers 1`] = `
Object {
"before": Array [
[Function],
],
}
`;
exports[`tsCustomTransformers should return an object containing all resolved transformers 2`] = `
Object {
"before": Array [
[Function],
[Function],
],
}
`;
exports[`tsCustomTransformers should return an object containing all resolved transformers 3`] = `
Object {
"after": Array [
[Function],
],
"before": Array [
[Function],
],
}
`;
exports[`tsCustomTransformers should return an object containing all resolved transformers 4`] = `
Object {
"afterDeclarations": Array [
[Function],
],
"before": Array [
[Function],
],
}
`;
exports[`tsJest jest should merge parent config if any with globals is an empty object 1`] = `
Object {
"babelConfig": undefined,
"compiler": "typescript",
"diagnostics": Object {
"ignoreCodes": Array [
6059,
18002,
18003,
],
"pretty": true,
"throws": true,
},
"isolatedModules": false,
"packageJson": Object {
"kind": "file",
"value": undefined,
},
"stringifyContentPathRegex": undefined,
"transformers": Object {},
"tsConfig": Object {
"kind": "file",
"value": undefined,
},
}
`;
exports[`tsJest jest should merge parent config if any with globals is undefined 1`] = `
Object {
"babelConfig": undefined,
"compiler": "typescript",
"diagnostics": Object {
"ignoreCodes": Array [
6059,
18002,
18003,
],
"pretty": true,
"throws": true,
},
"isolatedModules": false,
"packageJson": Object {
"kind": "file",
"value": undefined,
},
"stringifyContentPathRegex": undefined,
"transformers": Object {},
"tsConfig": Object {
"kind": "file",
"value": undefined,
},
}
`;
exports[`tsJest jest should return correct config and go thru backports 1`] = `
Object {
"babelConfig": undefined,
"compiler": "typescript",
"diagnostics": Object {
"ignoreCodes": Array [
6059,
18002,
18003,
],
"pretty": true,
"throws": true,
},
"isolatedModules": false,
"packageJson": Object {
"kind": "file",
"value": undefined,
},
"stringifyContentPathRegex": undefined,
"transformers": Object {},
"tsConfig": Object {
"kind": "file",
"value": undefined,
},
}
`;
exports[`tsJest transformers should display deprecation warning message when config transformers is string array 1`] = `
"[level:40] The configuration for astTransformers as string[] is deprecated and will be removed in ts-jest 27. Please define your custom AST transformers in a form of an object. More information you can check online documentation https://kulshekhar.github.io/ts-jest/user/config/astTransformers
"
`;