Skip to content

Commit

Permalink
fix(@schematics/angular): uniformize guard spec with service spec
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit f3259df)
  • Loading branch information
cexbrayat authored and dgp1130 committed Nov 14, 2019
1 parent 0626af1 commit 721b553
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { TestBed, async, inject } from '@angular/core/testing';
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({
providers: [<%= classify(name) %>Guard]
});
TestBed.configureTestingModule({});
guard = TestBed.inject(<%= classify(name) %>Guard);
});

it('should ...', inject([<%= classify(name) %>Guard], (guard: <%= classify(name) %>Guard) => {
it('should be created', () => {
expect(guard).toBeTruthy();
}));
});
});

0 comments on commit 721b553

Please sign in to comment.