You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/code-generators/__snapshots__/TypescriptCodeGenerator.spec.ts.snap
+108Lines changed: 108 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
exports[`TypescriptCodeGenerator should generate the correct code for ExternalModuleImport 1`] =`"import externalAlias = require('externalModuleLib');"`;
4
4
5
+
exports[`TypescriptCodeGenerator should generate the correct code for ExternalModuleImport with double quote 1`] =`"import externalAlias = require(\\"externalModuleLib\\");"`;
6
+
7
+
exports[`TypescriptCodeGenerator should generate the correct code for ExternalModuleImport with single quote 1`] =`"import externalAlias = require('externalModuleLib');"`;
8
+
5
9
exports[`TypescriptCodeGenerator should generate the correct code for GetterDeclaration 1`] =`
6
10
" public get pubGetter(): string {
7
11
thrownewError('Not implemented yet.');
@@ -140,8 +144,108 @@ exports[`TypescriptCodeGenerator should generate the correct code for NamedImpor
140
144
} from 'defaultWithNamedMultilineImport';"
141
145
`;
142
146
147
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with double quote 1`] =`"import {spec1, spec2asalias2} from \\"namedLib\\";"`;
148
+
149
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with double quote 2`] =`
150
+
"import {
151
+
spec1,
152
+
spec10,
153
+
spec11,
154
+
spec12,
155
+
spec13,
156
+
spec14,
157
+
spec15,
158
+
spec2,
159
+
spec3,
160
+
spec4,
161
+
spec5,
162
+
spec6,
163
+
spec7,
164
+
spec8,
165
+
spec9,
166
+
} from \\"multiLineNamedLib\\";"
167
+
`;
168
+
169
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with double quote 3`] =`"import {} from \\"emptyImport\\";"`;
170
+
171
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with double quote 4`] =`"import Default from \\"defaultImport\\";"`;
172
+
173
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with double quote 5`] =`"import Default, {spec1, spec2asalias2} from \\"defaultWithNamedImport\\";"`;
174
+
175
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with double quote 6`] =`
176
+
"import Default, {
177
+
spec1,
178
+
spec10,
179
+
spec11,
180
+
spec12,
181
+
spec13,
182
+
spec14,
183
+
spec15,
184
+
spec2,
185
+
spec3,
186
+
spec4,
187
+
spec5,
188
+
spec6,
189
+
spec7,
190
+
spec8,
191
+
spec9,
192
+
} from \\"defaultWithNamedMultilineImport\\";"
193
+
`;
194
+
195
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with single quote 1`] =`"import {spec1, spec2asalias2} from 'namedLib';"`;
196
+
197
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with single quote 2`] =`
198
+
"import {
199
+
spec1,
200
+
spec10,
201
+
spec11,
202
+
spec12,
203
+
spec13,
204
+
spec14,
205
+
spec15,
206
+
spec2,
207
+
spec3,
208
+
spec4,
209
+
spec5,
210
+
spec6,
211
+
spec7,
212
+
spec8,
213
+
spec9,
214
+
} from 'multiLineNamedLib';"
215
+
`;
216
+
217
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with single quote 3`] =`"import {} from 'emptyImport';"`;
218
+
219
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with single quote 4`] =`"import Default from 'defaultImport';"`;
220
+
221
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with single quote 5`] =`"import Default, {spec1, spec2asalias2} from 'defaultWithNamedImport';"`;
222
+
223
+
exports[`TypescriptCodeGenerator should generate the correct code for NamedImport with single quote 6`] =`
224
+
"import Default, {
225
+
spec1,
226
+
spec10,
227
+
spec11,
228
+
spec12,
229
+
spec13,
230
+
spec14,
231
+
spec15,
232
+
spec2,
233
+
spec3,
234
+
spec4,
235
+
spec5,
236
+
spec6,
237
+
spec7,
238
+
spec8,
239
+
spec9,
240
+
} from 'defaultWithNamedMultilineImport';"
241
+
`;
242
+
143
243
exports[`TypescriptCodeGenerator should generate the correct code for NamespaceImport 1`] =`"import * as namespaceAlias from 'namespaceLib';"`;
144
244
245
+
exports[`TypescriptCodeGenerator should generate the correct code for NamespaceImport with double quote 1`] =`"import * as namespaceAlias from \\"namespaceLib\\";"`;
246
+
247
+
exports[`TypescriptCodeGenerator should generate the correct code for NamespaceImport with single quote 1`] =`"import * as namespaceAlias from 'namespaceLib';"`;
248
+
145
249
exports[`TypescriptCodeGenerator should generate the correct code for ParameterDeclaration 1`] =`"param"`;
146
250
147
251
exports[`TypescriptCodeGenerator should generate the correct code for ParameterDeclaration 2`] =`"stringParam: string"`;
@@ -211,6 +315,10 @@ exports[`TypescriptCodeGenerator should generate the correct code for SetterDecl
211
315
212
316
exports[`TypescriptCodeGenerator should generate the correct code for StringImport 1`] =`"import 'stringLib';"`;
213
317
318
+
exports[`TypescriptCodeGenerator should generate the correct code for StringImport with double quote 1`] =`"import \\"stringLib\\";"`;
319
+
320
+
exports[`TypescriptCodeGenerator should generate the correct code for StringImport with single quote 1`] =`"import 'stringLib';"`;
321
+
214
322
exports[`TypescriptCodeGenerator should generate the correct code for SymbolSpecifier 1`] =`"SymbolSpecifier"`;
215
323
216
324
exports[`TypescriptCodeGenerator should generate the correct code for SymbolSpecifier 2`] =`"SymbolSpecifier as WithAlias"`;
0 commit comments