mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Alex Rickabaugh
parent
756dd34519
commit
c011ffae30
@@ -36,7 +36,7 @@ describe('SearchBoxComponent', () => {
|
||||
|
||||
describe('initialisation', () => {
|
||||
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' });
|
||||
component.ngOnInit();
|
||||
expect(location.search).toHaveBeenCalled();
|
||||
|
||||
Reference in New Issue
Block a user