Skip to content

Commit

Permalink
Improving code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefarzat committed Jan 8, 2019
1 parent a383dc4 commit 3afb804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/plotly/plotly.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('PlotlyService', () => {
const plotly = service.getPlotly();
const methods: (keyof PlotlyService)[] = ['plot', 'update', 'newPlot'];
methods.forEach(methodName => {
spyOn(plotly, methodName);
spyOn(plotly, methodName).and.returnValue(new Promise(() => {}));

(service as any)[methodName]('one' as any, 'two' as any, 'three' as any, 'four' as any);
expect(plotly[methodName]).toHaveBeenCalledWith('one', 'two', 'three', 'four');
Expand Down

0 comments on commit 3afb804

Please sign in to comment.