We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent319415b commita383dc4Copy full SHA for a383dc4
src/app/plotly/plotly.service.spec.ts
@@ -33,17 +33,18 @@ describe('PlotlyService', () => {
33
}));
34
35
it('should call plotly methods',inject([PlotlyService],(service:PlotlyService)=>{
36
+constplotly=service.getPlotly();
37
constmethods:(keyofPlotlyService)[]=['plot','update','newPlot'];
38
methods.forEach(methodName=>{
-spyOn(service,methodName);
39
+spyOn(plotly,methodName);
40
41
(serviceasany)[methodName]('one'asany,'two'asany,'three'asany,'four'asany);
-expect(service[methodName]).toHaveBeenCalledWith('one','two','three','four');
42
+expect(plotly[methodName]).toHaveBeenCalledWith('one','two','three','four');
43
});
44
-spyOn(service.getPlotly().Plots,'resize');
45
+spyOn(plotly.Plots,'resize');
46
service.resize('one'asany);
-expect(service.getPlotly().Plots.resize).toHaveBeenCalledWith('one');
47
+expect(plotly.Plots.resize).toHaveBeenCalledWith('one');
48
49
50