Document better the details of aync methods
Maintainer thường phản hồi trong vòng 4 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, typescript
- Lĩnh vực
- documentation, testing-qa
Hướng nghiên cứu
Bắt đầu với src/wait-for.js và trang dom-testing-library/api-async được liên kết, sau đó so sánh tài liệu waitFor hiện có với các câu hỏi của issue về interval và timeout. Công việc được xem là hoàn tất khi trang giải thích đủ rõ hành vi của cả hai tùy chọn để giải quyết ví dụ flaky và giúp người đọc hiểu về timing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
In the example seen at the bottom of this issue, I get flaky results. The assertion passes sometimes and fails sometimes. This comes from a lack of understanding by me of how async methods work. I've Googled the heck out of it and read the docs linked below a bunch of times. I also looked through the source code, but I found it to be difficult to understand from someone who hasn't worked in this project.
Describe the solution you'd like
Ultimately, I think there are a couple of waitFor options that should be documented in more detail. I'd like the below questions to be answered.
- What is the behavior of
intervaloption? - What is the behavior of the
timeoutoption?
I think this should be covered in detail here: https://testing-library.com/docs/dom-testing-library/api-async/
Describe alternatives you've considered A clear and concise description of
any alternative solutions or features you've considered.
NA
Additional context Add any other context or screenshots about the feature
request here.
Example code that has flaky results. I don't think the details of useDataFetch is important here, but let me know if I can answer any questions about it.
it('displays fetched data', async () => {
const increment = createIncrement();
const MyComponent = () => {
const { data } = useDataFetch(async () => {
await sleep(1);
return increment();
});
return <div>times fetch called: {data}</div>;
};
render(<MyComponent />);
const element = await screen.findByText('times fetch called: 2');
expect(element).toBeInTheDocument();
});
- Ngôn ngữ chính
- JavaScript
- Star
- 479
- Fork
- 738
- Merge trung bình
- 5 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 testing-library/testing-library-docs
-
Broken Chrome Extension Link in Queries DocsCó thể đã có người làm @rajanpanth đã nhận 60 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
testing-library/testing-library-docs#1499 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
testing-library/testing-library-docs#1528 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Framework wrappers and DOM testing libraryCó thể đã có người làm @jacklaurencegaray đã nhận 422 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
testing-library/testing-library-docs#1493 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
testing-library/testing-library-docs#1486 · 1 reaction ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
testing-library/testing-library-docs#1485 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 4 ngày
Tất cả issue của testing-library/testing-library-docs
Issue tương tự
-
area:install bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
yetone/magpie#2406 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: Prompt compressor crashes with TypeError when a past chat has a non-string response.textCó thể đã có người làm @ManojDevarajulu đã nhận hôm nay. Đang mởpossible bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Mintplex-Labs/anything-llm#6737 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Tooncast brazil feedĐang mởcheck:passed feeds:add
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 62/100
-
Remove the dead tree 'loadfail' handler in browser.js, which calls a non-existent tree.isSelected()Đang mởHousekeeping
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pgadmin-org/pgadmin4#10601 ·
Maintainer thường phản hồi trong vòng 1 ngày