File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,13 @@ for you to identify the part of your code that resulted in the error (async
24
24
stack traces are hard to debug). If you want to disable this, then set
25
25
` showOriginalStackTrace ` to ` false ` . You can also disable this for a specific
26
26
call in the options you pass to ` waitFor ` .
27
+ ` throwSuggestions ` : (experimental) When enabled, if [ better queries] ( https://testing-library.com/docs/guide-which-query ) are available
28
+ the test will fail and provide a suggested query to use instead. Default to ` false ` .
29
+
30
+ To disable a suggestion for a single query just add ` {suggest:false} ` as an option.
31
+ ``` js
32
+ screen .getByTestId (" foo" , {suggest: false }); // will not throw a suggestion
33
+ ```
27
34
28
35
` testIdAttribute ` : The attribute used by [ ` getByTestId ` ] ( api-queries#bytestid )
29
36
and related queries. Defaults to ` data-testid ` .
You can’t perform that action at this time.
0 commit comments