Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEachProviders(() => [
TestComponentBuilder,
SettingsService,
TaskService,
// RouteParams is instantiated with custom values upon injecting
provide(RouteParams, { useValue: new RouteParams({ id: null }) }),
MockBackend,
BaseRequestOptions,
// We override the default Http provider implementation
provide(Http, {
useFactory: (backend: MockBackend, options: BaseRequestOptions) => {
return new Http(backend, options);
},
deps: [MockBackend, BaseRequestOptions]
}),
TimerWidgetComponent
]);
it('should take the provided search term from query param provided via RouteParams', () => {
let search = new AlfrescoSearchComponent(null, null, null, new RouteParams({ q: 'exampleTerm692' }));
expect(search.searchTerm).toBe('exampleTerm692');
});