Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix test, after jasmine reset api change
  • Loading branch information
bzh2610 committed Oct 2, 2025
commit 77c4b773c6a5a067413ceaccb73fa12c96b82c43
11 changes: 10 additions & 1 deletion projects/plotly/src/lib/plotly.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,21 @@ describe('PlotlyComponent', () => {
await component.createPlot();
await fixture.whenStable();

spyOn(PlotlyJS.Plots, 'resize').and.callThrough();
const resizeSpy = spyOn(PlotlyJS.Plots, 'resize').and.callThrough();

window.dispatchEvent(new Event('resize'));
await fixture.whenStable();

expect(PlotlyJS.Plots.resize).toHaveBeenCalled();
resizeSpy.calls.reset();

fixture.destroy();
await fixture.whenStable();

window.dispatchEvent(new Event('resize'));
await fixture.whenStable();

expect(resizeSpy).not.toHaveBeenCalled();
});


Expand Down