/
program.spec.ts.snap
187 lines (165 loc) · 9.61 KB
/
program.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
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`allowJs with incremental program should compile js file for allowJs true with outDir 1`] = `
===[ FILE: test-allowJs-incremental-outDir.test.js ]============================
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = 42;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJmaWxlIjoidGVzdC1hbGxvd0pzLWluY3JlbWVudGFsLW91dERpci50ZXN0LmpzIiwibWFwcGluZ3MiOiI7O0FBQUEsa0JBQWUsRUFBRSxDQUFBIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbInRlc3QtYWxsb3dKcy1pbmNyZW1lbnRhbC1vdXREaXIudGVzdC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCA0MiJdLCJ2ZXJzaW9uIjozfQ==
===[ INLINE SOURCE MAPS ]=======================================================
file: test-allowJs-incremental-outDir.test.js
mappings: ';;AAAA,kBAAe,EAAE,CAAA'
names: []
sources:
- test-allowJs-incremental-outDir.test.js
sourcesContent:
- export default 42
version: 3
================================================================================
`;
exports[`allowJs with incremental program should compile js file for allowJs true without outDir 1`] = `
===[ FILE: test-allowJs-incremental-no-outDir.test.js ]=========================
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = 42;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJmaWxlIjoidGVzdC1hbGxvd0pzLWluY3JlbWVudGFsLW5vLW91dERpci50ZXN0LmpzIiwibWFwcGluZ3MiOiI7O0FBQUEsa0JBQWUsRUFBRSxDQUFBIiwibmFtZXMiOltdLCJzb3VyY2VzIjpbInRlc3QtYWxsb3dKcy1pbmNyZW1lbnRhbC1uby1vdXREaXIudGVzdC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCA0MiJdLCJ2ZXJzaW9uIjozfQ==
===[ INLINE SOURCE MAPS ]=======================================================
file: test-allowJs-incremental-no-outDir.test.js
mappings: ';;AAAA,kBAAe,EAAE,CAAA'
names: []
sources:
- test-allowJs-incremental-no-outDir.test.js
sourcesContent:
- export default 42
version: 3
================================================================================
`;
exports[`allowJs with program should compile js file for allowJs true with outDir 1`] = `
===[ FILE: test-allowJs-program-outDir.test.js ]================================
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = 42;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJmaWxlIjoidGVzdC1hbGxvd0pzLXByb2dyYW0tb3V0RGlyLnRlc3QuanMiLCJtYXBwaW5ncyI6Ijs7QUFBQSxrQkFBZSxFQUFFLENBQUEiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsidGVzdC1hbGxvd0pzLXByb2dyYW0tb3V0RGlyLnRlc3QuanMiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgNDIiXSwidmVyc2lvbiI6M30=
===[ INLINE SOURCE MAPS ]=======================================================
file: test-allowJs-program-outDir.test.js
mappings: ';;AAAA,kBAAe,EAAE,CAAA'
names: []
sources:
- test-allowJs-program-outDir.test.js
sourcesContent:
- export default 42
version: 3
================================================================================
`;
exports[`allowJs with program should compile js file for allowJs true without outDir 1`] = `
===[ FILE: test-allowJs-program-no-outDir.test.js ]=============================
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = 42;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJmaWxlIjoidGVzdC1hbGxvd0pzLXByb2dyYW0tbm8tb3V0RGlyLnRlc3QuanMiLCJtYXBwaW5ncyI6Ijs7QUFBQSxrQkFBZSxFQUFFLENBQUEiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsidGVzdC1hbGxvd0pzLXByb2dyYW0tbm8tb3V0RGlyLnRlc3QuanMiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgNDIiXSwidmVyc2lvbiI6M30=
===[ INLINE SOURCE MAPS ]=======================================================
file: test-allowJs-program-no-outDir.test.js
mappings: ';;AAAA,kBAAe,EAAE,CAAA'
names: []
sources:
- test-allowJs-program-no-outDir.test.js
sourcesContent:
- export default 42
version: 3
================================================================================
`;
exports[`cannot compile should throw error with incremental program 1`] = `
"Unable to require \`.d.ts\` file for file: test-cannot-compile.d.ts.
This is usually the result of a faulty configuration or import. Make sure there is a \`.js\`, \`.json\` or another executable extension available alongside \`test-cannot-compile.d.ts\`."
`;
exports[`cannot compile should throw error with incremental program 2`] = `"Unable to read file: test-cannot-compile.jsx"`;
exports[`cannot compile should throw error with normal program 1`] = `
"Unable to require \`.d.ts\` file for file: test-cannot-compile.d.ts.
This is usually the result of a faulty configuration or import. Make sure there is a \`.js\`, \`.json\` or another executable extension available alongside \`test-cannot-compile.d.ts\`."
`;
exports[`cannot compile should throw error with normal program 2`] = `"Unable to read file: test-cannot-compile.jsx"`;
exports[`diagnostics incremental program should report diagnostics with pathRegex config matches file name 1`] = `"test-typings.ts(3,7): error TS2322: Type 'number' is not assignable to type 'string'."`;
exports[`diagnostics normal program should report diagnostics with pathRegex config matches file name 1`] = `"test-typings.ts(3,7): error TS2322: Type 'number' is not assignable to type 'string'."`;
exports[`jsx preserve should compile tsx file for with incremental program 1`] = `
===[ FILE: test-jsx-preserve.tsx ]==============================================
"use strict";
var App = function () {
return <>Test</>;
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJmaWxlIjoidGVzdC1qc3gtcHJlc2VydmUudHN4IiwibWFwcGluZ3MiOiI7QUFDTSxJQUFNLEdBQUcsR0FBRztJQUNWLE9BQU8sRUFBRSxJQUFJLEdBQUcsQ0FBQTtBQUNsQixDQUFDLENBQUEiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsidGVzdC1qc3gtcHJlc2VydmUudHN4Il0sInNvdXJjZXNDb250ZW50IjpbIlxuICAgICAgY29uc3QgQXBwID0gKCkgPT4ge1xuICAgICAgICByZXR1cm4gPD5UZXN0PC8+XG4gICAgICB9XG4gICAgIl0sInZlcnNpb24iOjN9
===[ INLINE SOURCE MAPS ]=======================================================
file: test-jsx-preserve.tsx
mappings: ';AACM,IAAM,GAAG,GAAG;IACV,OAAO,EAAE,IAAI,GAAG,CAAA;AAClB,CAAC,CAAA'
names: []
sources:
- test-jsx-preserve.tsx
sourcesContent:
- |2-
const App = () => {
return <>Test</>
}
version: 3
================================================================================
`;
exports[`jsx preserve should compile tsx file with program 1`] = `
===[ FILE: test-jsx-preserve.tsx ]==============================================
"use strict";
var App = function () {
return <>Test</>;
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJmaWxlIjoidGVzdC1qc3gtcHJlc2VydmUudHN4IiwibWFwcGluZ3MiOiI7QUFDTSxJQUFNLEdBQUcsR0FBRztJQUNWLE9BQU8sRUFBRSxJQUFJLEdBQUcsQ0FBQTtBQUNsQixDQUFDLENBQUEiLCJuYW1lcyI6W10sInNvdXJjZXMiOlsidGVzdC1qc3gtcHJlc2VydmUudHN4Il0sInNvdXJjZXNDb250ZW50IjpbIlxuICAgICAgY29uc3QgQXBwID0gKCkgPT4ge1xuICAgICAgICByZXR1cm4gPD5UZXN0PC8+XG4gICAgICB9XG4gICAgIl0sInZlcnNpb24iOjN9
===[ INLINE SOURCE MAPS ]=======================================================
file: test-jsx-preserve.tsx
mappings: ';AACM,IAAM,GAAG,GAAG;IACV,OAAO,EAAE,IAAI,GAAG,CAAA;AAClB,CAAC,CAAA'
names: []
sources:
- test-jsx-preserve.tsx
sourcesContent:
- |2-
const App = () => {
return <>Test</>
}
version: 3
================================================================================
`;
exports[`other jsx options should compile tsx file for with incremental program 1`] = `
===[ FILE: test-jsx-options.tsx ]===============================================
"use strict";
var App = function () {
return React.createElement(React.Fragment, null, "Test");
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJmaWxlIjoidGVzdC1qc3gtb3B0aW9ucy50c3giLCJtYXBwaW5ncyI6IjtBQUNNLElBQU0sR0FBRyxHQUFHO0lBQ1YsT0FBTyxpREFBUyxDQUFBO0FBQ2xCLENBQUMsQ0FBQSIsIm5hbWVzIjpbXSwic291cmNlcyI6WyJ0ZXN0LWpzeC1vcHRpb25zLnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJcbiAgICAgIGNvbnN0IEFwcCA9ICgpID0+IHtcbiAgICAgICAgcmV0dXJuIDw+VGVzdDwvPlxuICAgICAgfVxuICAgICJdLCJ2ZXJzaW9uIjozfQ==
===[ INLINE SOURCE MAPS ]=======================================================
file: test-jsx-options.tsx
mappings: ';AACM,IAAM,GAAG,GAAG;IACV,OAAO,iDAAS,CAAA;AAClB,CAAC,CAAA'
names: []
sources:
- test-jsx-options.tsx
sourcesContent:
- |2-
const App = () => {
return <>Test</>
}
version: 3
================================================================================
`;
exports[`other jsx options should compile tsx file for with program 1`] = `
===[ FILE: test-jsx-options.tsx ]===============================================
"use strict";
var App = function () {
return React.createElement(React.Fragment, null, "Test");
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJmaWxlIjoidGVzdC1qc3gtb3B0aW9ucy50c3giLCJtYXBwaW5ncyI6IjtBQUNNLElBQU0sR0FBRyxHQUFHO0lBQ1YsT0FBTyxpREFBUyxDQUFBO0FBQ2xCLENBQUMsQ0FBQSIsIm5hbWVzIjpbXSwic291cmNlcyI6WyJ0ZXN0LWpzeC1vcHRpb25zLnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJcbiAgICAgIGNvbnN0IEFwcCA9ICgpID0+IHtcbiAgICAgICAgcmV0dXJuIDw+VGVzdDwvPlxuICAgICAgfVxuICAgICJdLCJ2ZXJzaW9uIjozfQ==
===[ INLINE SOURCE MAPS ]=======================================================
file: test-jsx-options.tsx
mappings: ';AACM,IAAM,GAAG,GAAG;IACV,OAAO,iDAAS,CAAA;AAClB,CAAC,CAAA'
names: []
sources:
- test-jsx-options.tsx
sourcesContent:
- |2-
const App = () => {
return <>Test</>
}
version: 3
================================================================================
`;