example.service.spec.ts
describe('ExampleService', () => {
const _httpClient = new HttpClient(null);
const _otherService = new OtherService(null, null);
let service: ExampleService;
beforeEach(() => {
service = new TimingBenchmarkService(_httpClient, _otherService);
});
test('the service multiplies two numbers', () => {
expect(service.multiply(1, 2)).toEqual(2);
});
test('service.produceWidgets', () => {
expect(service.produceWidgets(1, 60)).toEqual('60 widgets produced in 1 hour');
});
});