const module = angular.mock.module; const inject = angular.mock.inject; let searchService; describe('Testing some awesome service', () => { beforeAll(module('yourModule')); beforeEach(inject($injector => { searchService = $injector.get('SearchClass'); })); it('Should be defined', () => { expect(searchService).toBeDefined(); }); )}