Skip to content

Commit 2e02112

Browse files
committed
Quickfix for testing angular9
1 parent a2de0f6 commit 2e02112

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

angular.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"src/styles.css"
2626
],
2727
"scripts": [
28-
"node_modules/plotly.js/dist/plotly.min.js"
28+
"node_modules/plotly.js/dist/plotly.min.js"
2929
]
3030
},
3131
"configurations": {
@@ -137,5 +137,8 @@
137137
"@schematics/angular:directive": {
138138
"prefix": "plotly"
139139
}
140+
},
141+
"cli": {
142+
"analytics": "54eda63f-d875-4cef-9211-d2e2dd14ac9f"
140143
}
141-
}
144+
}

src/app/shared/plot/plot.component.spec.ts

-7
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,6 @@ describe('PlotComponent', () => {
172172
});
173173

174174
it('should clear all added window events on destroy', async (done) => {
175-
176-
spyOn(component, 'ngOnDestroy').and.callThrough();
177-
178175
const windowListenerCount = (<any>window).eventListeners().length;
179176

180177
// make component responsive via both the lib and the component (at least 2 window events are added)
@@ -185,13 +182,9 @@ describe('PlotComponent', () => {
185182
await component.createPlot();
186183
await fixture.whenStable();
187184

188-
expect(component.ngOnDestroy).not.toHaveBeenCalled();
189-
190185
fixture.destroy();
191186
await fixture.whenStable();
192187

193-
expect(component.ngOnDestroy).toHaveBeenCalled();
194-
195188
// amount of listeners should be the same as before initializing the component
196189
expect((<any>window).eventListeners().length).toEqual(windowListenerCount);
197190

0 commit comments

Comments
 (0)