@@ -143,7 +143,7 @@ describe('Guard Schematic', () => {
143143 const options = { ...defaultOptions , implements : implementationOptions , functional : false } ;
144144 const tree = await schematicRunner . runSchematic ( 'guard' , options , appTree ) ;
145145 const fileString = tree . readContent ( '/projects/bar/src/app/foo.guard.ts' ) ;
146- const expectedImports = `import { CanMatch, Route, UrlSegment, UrlTree } from '@angular/router';` ;
146+ const expectedImports = `import { CanMatch, GuardResult, MaybeAsync, Route, UrlSegment } from '@angular/router';` ;
147147
148148 expect ( fileString ) . toContain ( expectedImports ) ;
149149 } ) ;
@@ -153,7 +153,9 @@ describe('Guard Schematic', () => {
153153 const options = { ...defaultOptions , implements : implementationOptions , functional : false } ;
154154 const tree = await schematicRunner . runSchematic ( 'guard' , options , appTree ) ;
155155 const fileString = tree . readContent ( '/projects/bar/src/app/foo.guard.ts' ) ;
156- const expectedImports = `import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree } from '@angular/router';` ;
156+ const expectedImports =
157+ `import { ActivatedRouteSnapshot, CanActivate, GuardResult, ` +
158+ `MaybeAsync, RouterStateSnapshot } from '@angular/router';` ;
157159
158160 expect ( fileString ) . toContain ( expectedImports ) ;
159161 } ) ;
@@ -173,9 +175,8 @@ describe('Guard Schematic', () => {
173175 const tree = await schematicRunner . runSchematic ( 'guard' , options , appTree ) ;
174176 const fileString = tree . readContent ( '/projects/bar/src/app/foo.guard.ts' ) ;
175177 const expectedImports =
176- `import ` +
177- `{ ActivatedRouteSnapshot, CanActivate, CanActivateChild, CanMatch, Route, RouterStateSnapshot, UrlSegment, UrlTree } ` +
178- `from '@angular/router';` ;
178+ `import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, CanMatch, GuardResult, ` +
179+ `MaybeAsync, Route, RouterStateSnapshot, UrlSegment } from '@angular/router';` ;
179180
180181 expect ( fileString ) . toContain ( expectedImports ) ;
181182 } ) ;
0 commit comments