testing with create-react-app
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, react
- Lĩnh vực
- data-visualization, frontend, testing
Hướng nghiên cứu
Tái hiện lỗi bằng lệnh kiểm thử của create-react-app và kiểm tra stack từ src/App.test.js qua src/App.js, src/container/GraphContainer.js, src/components/Graph/index.js và src/components/Graph/StyledGraph.js. So sánh các import của Plotly và cách sử dụng factory của react-plotly.js với môi trường kiểm thử jsdom. Được xem là hoàn tất khi bài kiểm thử render mặc định chạy mà không gặp lỗi liên quan đến document.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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);
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 138
- Merge trung bình
- 3 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của plotly/react-plotly.js
-
P3 plotly-internal size: 1 task
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
plotly/react-plotly.js#386 ·
-
enhancement P3 size: 1
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
plotly/react-plotly.js#380 · 7 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
plotly/react-plotly.js#358 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
plotly/react-plotly.js#354 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
plotly/react-plotly.js#353 · 1 bình luận ·
Tất cả issue của plotly/react-plotly.js
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Seeed-Studio/wiki-documents#5655 · 2 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Edit: CW+ Đang mởchannels:edit check:passed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
01 type: bug 30 needs: triage 99 tag: UX Accessibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
quarto-dev/quarto-cli#14915 ·