@@ -281,6 +281,27 @@ describe('@ngtools/webpack transformers', () => {
281
281
expect ( tags . oneLine `${ result } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
282
282
} ) ;
283
283
284
+ it ( `should remove import for 'ExpressionWithTypeArguments' implements token` , ( ) => {
285
+ const input = tags . stripIndent `
286
+ import { Bar, Buz, Unused } from './bar';
287
+
288
+ export class Foo extends Bar implements Buz { }
289
+
290
+ ${ dummyNode }
291
+ ` ;
292
+
293
+ const output = tags . stripIndent `
294
+ import { Bar } from './bar';
295
+
296
+ export class Foo extends Bar { }
297
+ ` ;
298
+
299
+ const { program, compilerHost } = createTypescriptContext ( input ) ;
300
+ const result = transformTypescript ( undefined , [ transformer ( program ) ] , program , compilerHost ) ;
301
+
302
+ expect ( tags . oneLine `${ result } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
303
+ } ) ;
304
+
284
305
describe ( 'should elide imports decorator type references when emitDecoratorMetadata is false' , ( ) => {
285
306
const extraCompilerOptions : ts . CompilerOptions = {
286
307
emitDecoratorMetadata : false ,
@@ -317,27 +338,6 @@ describe('@ngtools/webpack transformers', () => {
317
338
} ) ;
318
339
} ) ;
319
340
320
- it ( `should remove import for 'ExpressionWithTypeArguments' implements token` , ( ) => {
321
- const input = tags . stripIndent `
322
- import { Bar, Buz, Unused } from './bar';
323
-
324
- export class Foo extends Bar implements Buz { }
325
-
326
- ${ dummyNode }
327
- ` ;
328
-
329
- const output = tags . stripIndent `
330
- import { Bar } from './bar';
331
-
332
- export class Foo extends Bar { }
333
- ` ;
334
-
335
- const { program, compilerHost } = createTypescriptContext ( input ) ;
336
- const result = transformTypescript ( undefined , [ transformer ( program ) ] , program , compilerHost ) ;
337
-
338
- expect ( tags . oneLine `${ result } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
339
- } ) ;
340
-
341
341
describe ( 'should not elide imports decorator type references when emitDecoratorMetadata is true' , ( ) => {
342
342
const extraCompilerOptions : ts . CompilerOptions = {
343
343
emitDecoratorMetadata : true ,
@@ -515,6 +515,8 @@ describe('@ngtools/webpack transformers', () => {
515
515
import { __decorate, __metadata } from "tslib";
516
516
517
517
import { Decorator } from './decorator';
518
+ import { Service } from './service';
519
+
518
520
export class Foo { name(f) { } }
519
521
520
522
__decorate([ Decorator(), __metadata("design:type", Function), __metadata("design:paramtypes", [Service]),
0 commit comments