@@ -143,7 +143,7 @@ describe('Guard Schematic', () => {
143
143
const options = { ...defaultOptions , implements : implementationOptions , functional : false } ;
144
144
const tree = await schematicRunner . runSchematic ( 'guard' , options , appTree ) ;
145
145
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';` ;
147
147
148
148
expect ( fileString ) . toContain ( expectedImports ) ;
149
149
} ) ;
@@ -153,7 +153,9 @@ describe('Guard Schematic', () => {
153
153
const options = { ...defaultOptions , implements : implementationOptions , functional : false } ;
154
154
const tree = await schematicRunner . runSchematic ( 'guard' , options , appTree ) ;
155
155
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';` ;
157
159
158
160
expect ( fileString ) . toContain ( expectedImports ) ;
159
161
} ) ;
@@ -173,9 +175,8 @@ describe('Guard Schematic', () => {
173
175
const tree = await schematicRunner . runSchematic ( 'guard' , options , appTree ) ;
174
176
const fileString = tree . readContent ( '/projects/bar/src/app/foo.guard.ts' ) ;
175
177
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';` ;
179
180
180
181
expect ( fileString ) . toContain ( expectedImports ) ;
181
182
} ) ;
0 commit comments