Document better the details of aync methods
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, typescript
調査の方向性
src/wait-for.js とリンク先の dom-testing-library/api-async ページから始め、既存の waitFor ドキュメントを issue の interval と timeout に関する質問と比較します。ページで両方のオプションの動作が、flaky な例に対処し、読者がタイミングを理解できる程度に明確に説明されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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();
});
- 主要言語
- JavaScript
- スター
- 479
- フォーク
- 738
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
testing-library/testing-library-docs のほかの issue
-
Vue - FAQ about Vue Router is outdated対応中かも @SatvikMishra08 が 9 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
testing-library/testing-library-docs#1570 · コメント 1 件 ·
-
Broken Chrome Extension Link in Queries Docs対応中かも @rajanpanth が 58 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
Framework wrappers and DOM testing library対応中かも @jacklaurencegaray が 420 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
testing-library/testing-library-docs#1493 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
testing-library/testing-library-docs#1486 · リアクション 1 件 ·
testing-library/testing-library-docs の issue をすべて見る
似ている issue
-
area: docs good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
Support
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
openseadragon/openseadragon#2996 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jfromaniello/url-join#134 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100