plotly / plotly/react-plotly.js
testing with create-react-app
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 1.1k
- フォーク
- 138
- 平均マージ
- 3日 2時間
- マージ済み PR(30日)
- 4
説明
Hi! Thanks for all the good work.
I am trying to make the simple test that comes with create-react-app to work. (Which checks whole app renders without a crash)
I get an error like below.
TypeError: Cannot read property 'document' of undefined
at node_modules/plotly.js/dist/plotly.js:74:22
at node_modules/plotly.js/dist/plotly.js:9620:2
at Object.<anonymous>._$numerical_517.BADNUM (node_modules/plotly.js/dist/plotly.js:7:88)
at Object.<anonymous> (node_modules/plotly.js/dist/plotly.js:7:327)
at Object.<anonymous> (node_modules/react-plotly.js/react-plotly.js:11:15)
at Object.<anonymous> (src/components/Graph/StyledGraph.js:2:20)
at Object.<anonymous> (src/components/Graph/index.js:4:20)
at Object.<anonymous> (src/container/GraphContainer.js:6:14)
at Object.<anonymous> (src/App.js:7:23)
at Object.<anonymous> (src/Main.js:14:12)
at Object.<anonymous> (src/App.test.js:5:13)
I am using pretty much the default command that comes with create-react-app. (Test command node scripts/test.js --env=jsdom, react-app-preset)
import Plotly from 'plotly.js/dist/basic';
I am using Plotly like below.
import Plotly from 'plotly.js/dist/basic';
import createPlotlyComponent from 'react-plotly.js/factory';
const Plot = createPlotlyComponent(Plotly);
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
create-react-app のテストコマンドで失敗を再現し、src/App.test.js から src/App.js、src/container/GraphContainer.js、src/components/Graph/index.js、src/components/Graph/StyledGraph.js までのスタックを調査します。Plotly のインポートと react-plotly.js factory の使用方法を jsdom テスト環境と比較します。document 関連のエラーなしでデフォルトのレンダリングテストが実行されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- data-visualization, frontend, testing
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100