Skip to content

Commit 3afb804

Browse files
committed
Improving code coverage
1 parent a383dc4 commit 3afb804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/plotly/plotly.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('PlotlyService', () => {
3636
const plotly = service.getPlotly();
3737
const methods: (keyof PlotlyService)[] = ['plot', 'update', 'newPlot'];
3838
methods.forEach(methodName => {
39-
spyOn(plotly, methodName);
39+
spyOn(plotly, methodName).and.returnValue(new Promise(() => {}));
4040

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

0 commit comments

Comments
 (0)