mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
The current guard spec schematic uses `inject` whereas we dropped it for the service spec a while ago. This commits updates the guard spec schematic to be similar to the current service spec.
17 lines
417 B
Plaintext
17 lines
417 B
Plaintext
import { TestBed } from '@angular/core/testing';
|
|
|
|
import { <%= classify(name) %>Guard } from './<%= dasherize(name) %>.guard';
|
|
|
|
describe('<%= classify(name) %>Guard', () => {
|
|
let guard: <%= classify(name) %>Guard;
|
|
|
|
beforeEach(() => {
|
|
TestBed.configureTestingModule({});
|
|
guard = TestBed.inject(<%= classify(name) %>Guard);
|
|
});
|
|
|
|
it('should be created', () => {
|
|
expect(guard).toBeTruthy();
|
|
});
|
|
});
|