plotly / plotly/angular-plotly.js

Plotly object not found on window" when unit testing a component

未关闭
#206 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
242
派生
81
平均合并
8 小时 48 分钟
30 天内合并 PR
18

描述

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)

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用报告的 Karma/Webpack 堆栈跟踪复现组件单元测试,并检查 PlotlyViaWindowModule 周围的 Angular Plotly 设置。完成的标准是测试能够在没有“Plotly object not found on window”的情况下初始化;该 issue 没有指出 repository 的源文件或测试,因此首先从失败的 spec 中定位它们。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend, testing
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。