From a4742763b9a093285559b4cfdd4a2eb52006b995 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Fri, 8 Dec 2017 15:27:44 -0800 Subject: [PATCH] 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. --- aio/src/app/search/search-box/search-box.component.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/src/app/search/search-box/search-box.component.spec.ts b/aio/src/app/search/search-box/search-box.component.spec.ts index 94a70f76b7..4fabfc54a7 100644 --- a/aio/src/app/search/search-box/search-box.component.spec.ts +++ b/aio/src/app/search/search-box/search-box.component.spec.ts @@ -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();