test(aio): correct usage of fakeAsync and inject together in test
Corrects a test which wrapped the fakeAsync call in an inject call. This caused the test to not actually run.
This commit is contained in:
parent
05ff6c09ca
commit
a4742763b9
|
@ -36,7 +36,7 @@ describe('SearchBoxComponent', () => {
|
||||||
|
|
||||||
describe('initialisation', () => {
|
describe('initialisation', () => {
|
||||||
it('should get the current search query from the location service',
|
it('should get the current search query from the location service',
|
||||||
inject([LocationService], (location: MockLocationService) => fakeAsync(() => {
|
fakeAsync(inject([LocationService], (location: MockLocationService) => {
|
||||||
location.search.and.returnValue({ search: 'initial search' });
|
location.search.and.returnValue({ search: 'initial search' });
|
||||||
component.ngOnInit();
|
component.ngOnInit();
|
||||||
expect(location.search).toHaveBeenCalled();
|
expect(location.search).toHaveBeenCalled();
|
||||||
|
|
Loading…
Reference in New Issue