@@ -281,6 +281,27 @@ describe('@ngtools/webpack transformers', () => {
281281 expect ( tags . oneLine `${ result } ` ) . toEqual ( tags . oneLine `${ output } ` ) ;
282282 } ) ;
283283
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+
284305 describe ( 'should elide imports decorator type references when emitDecoratorMetadata is false' , ( ) => {
285306 const extraCompilerOptions : ts . CompilerOptions = {
286307 emitDecoratorMetadata : false ,
@@ -317,27 +338,6 @@ describe('@ngtools/webpack transformers', () => {
317338 } ) ;
318339 } ) ;
319340
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-
341341 describe ( 'should not elide imports decorator type references when emitDecoratorMetadata is true' , ( ) => {
342342 const extraCompilerOptions : ts . CompilerOptions = {
343343 emitDecoratorMetadata : true ,
@@ -515,6 +515,8 @@ describe('@ngtools/webpack transformers', () => {
515515 import { __decorate, __metadata } from "tslib";
516516
517517 import { Decorator } from './decorator';
518+ import { Service } from './service';
519+
518520 export class Foo { name(f) { } }
519521
520522 __decorate([ Decorator(), __metadata("design:type", Function), __metadata("design:paramtypes", [Service]),
0 commit comments