Skip to content

Commit

Permalink
Adding quick test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrefarzat committed Mar 24, 2019
1 parent 53c4ded commit e892381
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app/shared/plot/plot.component.spec.ts
Expand Up @@ -141,6 +141,17 @@ describe('PlotComponent', () => {
}, 13);
});

it('should fail when plotlyInstance is undefined', () => {
component.plotlyInstance = undefined;

const error = new Error(`Plotly component wasn't initialized`);
const fn = () => {
component.updatePlot();
};

expect(fn).toThrow(error);
});

it('should add handler into window.resize when useResizeHandler=true', () => {
spyOn(component, 'getWindow').and.callFake(() => windowSpy);

Expand Down

0 comments on commit e892381

Please sign in to comment.