サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
ノーベル賞
testing-library.com
Several utilities are provided for dealing with asynchronous code. These can be useful to wait for an element to appear or disappear in response to an event, user action, timeout, or Promise. (See the guide to testing disappearance.) The async methods return Promises, so be sure to use await or .then when calling them. findBy QueriesfindBy methods are a combination of getBy queries and waitFor. T
OverviewQueries are the methods that Testing Library gives you to find elements on the page. There are several types of queries ("get", "find", "query"); the difference between them is whether the query will throw an error if no element is found or if it will return a Promise and retry. Depending on what page content you are selecting, different queries may be more or less appropriate. See the pr
The problemYou want to write maintainable tests for your React components. As a part of this goal, you want your tests to avoid including implementation details of your components and rather focus on making your tests give you the confidence for which they are intended. As part of this, you want your testbase to be maintainable in the long run so refactors of your components (changes to implement
The more your tests resemble the way your software is used, the more confidence they can give you.
このページを最初にブックマークしてみませんか?
『Testing Library | Testing Library』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く