-
-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
Hello. I am trying to create a unit test for one of the component in a angular 10 project. When running the test, I get an error that says "Plotly object not found on window." with the following trace
at new PlotlyViaWindowModule (../../../../projects/plotly/src/lib/plotly-via-window.module.ts:19:19)
at _createClass (../../../../../packages/core/src/view/ng_module.ts:178:14)
at _createProviderInstance (../../../../../packages/core/src/view/ng_module.ts:150:20)
at initNgModule (../../../../../packages/core/src/view/ng_module.ts:77:24)
at new NgModuleRef_ (../../../../../packages/core/src/view/refs.ts:409:5)
at createNgModuleRef (../../../../../packages/core/src/view/refs.ts:391:10)
at Object.debugCreateNgModuleRef [as createNgModuleRef] (../../../../../packages/core/src/view/services.ts:166:10)
at NgModuleFactory_.Object.<anonymous>.NgModuleFactory_.create (../../../../../packages/core/src/view/entrypoint.ts:73:21)
at TestBedViewEngine.Object.<anonymous>.TestBedViewEngine._initIfNeeded (../../../../../packages/core/testing/src/test_bed.ts:416:43)
at TestBedViewEngine.Object.<anonymous>.TestBedViewEngine.createComponent (../../../../../packages/core/testing/src/test_bed.ts:598:10)
at Function.Object.<anonymous>.TestBedViewEngine.createComponent (../../../../../packages/core/testing/src/test_bed.ts:245:36)
at src/lib/measurements-lists/measurements-list/measurements-list.component.spec.ts:122:23
at ../../../../node_modules/zone.js/dist/fake-async-test.js:610:34
at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (../../../../node_modules/zone.js/dist/zone.js:386:30)
at ProxyZoneSpec.Object.<anonymous>.ProxyZoneSpec.onInvoke (../../../../node_modules/zone.js/dist/proxy.js:117:43)
at ZoneDelegate.Object.<anonymous>.ZoneDelegate.invoke (../../../../node_modules/zone.js/dist/zone.js:385:36)
at Zone.Object.<anonymous>.Zone.run (../../../../node_modules/zone.js/dist/zone.js:143:47)
Any idea about this? I would be happy to provide more info.
Thanks in advance
Metadata
Metadata
Assignees
Labels
No labels