plotly / plotly/angular-plotly.js
Plotly object not found on window" when unit testing a component
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 242
- Forks
- 81
- Avg merge
- 8h 48m
- Merged PRs (30d)
- 18
Description
Error: Plotly object not found on window.
Error: Plotly object not found on window.
at new PlotlyViaWindowModule (http://localhost:9876/_karma_webpack_/webpack:/node_modules/angular-plotly.js/fesm2015/angular-plotly.js.js:634:1)
at Object.PlotlyViaWindowModule_Factory [as factory] (http://localhost:9876/_karma_webpack_/webpack:/node_modules/angular-plotly.js/fesm2015/angular-plotly.js.js:639:74)
at R3Injector.hydrate (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:11457:1)
at R3Injector.get (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:11276:1)
at http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:11314:1
at Set.forEach (<anonymous>)
at R3Injector._resolveInjectorDefTypes (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:11314:1)
at new NgModuleRef$1 (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/core.js:25345:1)
at R3TestBedCompiler.finalize (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/testing.js:926:1)
at TestBedRender3.get testModuleRef [as testModuleRef] (http://localhost:9876/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2015/testing.js:1789:1)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the component unit test using the reported Karma/Webpack stack trace and inspect the Angular Plotly setup around PlotlyViaWindowModule. Done means the test can initialize without “Plotly object not found on window”; the issue does not name a repository source file or test, so locate those from the failing spec first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100