@@ -90,14 +90,15 @@ second argument. If you're using testing-library in a browser you almost always
9090want to set this to ` true ` . Only very old browser don't support this property
9191(such as IE 8 and earlier). However, ` jsdom ` does not support the second
9292argument currently. This includes versions of ` jsdom ` prior to ` 16.4.0 ` and any
93- version that logs a ` not implemented ` warning when calling ` getComputedStyle `
93+ version that logs a ` not implemented ` warning when calling
94+ [ ` getComputedStyle ` ] ( https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle )
9495with a second argument e.g.
9596` window.getComputedStyle(document.createElement('div'), '::after') ` . Defaults to
9697` false `
9798
9899### ` defaultHidden `
99100
100- The default value for the ` hidden ` option used by
101+ The default value for the [ ` hidden ` option] ( queries/byrole#hidden ) used by
101102[ ` getByRole ` ] ( queries/byrole.mdx ) . Defaults to ` false ` .
102103
103104### ` defaultIgnore `
@@ -110,12 +111,12 @@ Defaults to `script, style`.
110111
111112### ` showOriginalStackTrace `
112113
113- By default, ` waitFor ` will ensure that the stack trace for errors thrown by
114- Testing Library is cleaned up and shortened so it's easier for you to identify
115- the part of your code that resulted in the error (async stack traces are hard to
116- debug). If you want to disable this, then set ` showOriginalStackTrace ` to
117- ` false ` . You can also disable this for a specific call in the options you pass
118- to ` waitFor ` .
114+ By default, [ ` waitFor ` ] ( api-async#waitfor ) will ensure that the stack trace for
115+ errors thrown by Testing Library is cleaned up and shortened so it's easier for
116+ you to identify the part of your code that resulted in the error (async stack
117+ traces are hard to debug). If you want to disable this, then
118+ set ` showOriginalStackTrace ` to ` false ` . You can also disable this for a specific
119+ call in the options you pass to ` waitFor ` .
119120
120121### ` throwSuggestions ` (experimental)
121122
@@ -132,8 +133,8 @@ screen.getByTestId('foo', {suggest: false}) // will not throw a suggestion
132133
133134:::note
134135
135- When this option is enabled, it may provide suggestions that lack an
136- intuitive implementation. Typically this happens for
136+ When this option is enabled, it may provide suggestions that lack an intuitive
137+ implementation. Typically this happens for
137138[ roles which cannot be named] ( https://w3c.github.io/aria/#namefromprohibited ) ,
138139most notably paragraphs. For instance, if you attempt to use
139140[ ` getByText ` ] ( queries/bytext.mdx ) , you may encounter the following error:
@@ -143,12 +144,13 @@ TestingLibraryElementError: A better query is available, try this:
143144 getByRole('paragraph')
144145```
145146
146- However, there is no direct way to query paragraphs using the config object parameter, such as in
147- ` getByRole('paragraph', { name: 'Hello World' }) ` .
147+ However, there is no direct way to query paragraphs using the config object
148+ parameter, such as in ` getByRole('paragraph', { name: 'Hello World' }) ` .
148149
149150To address this issue, you can leverage a custom function to validate the
150- element's structure, as shown in the example below.
151- More information can be found in the [ GitHub issue] ( https://github.com/testing-library/dom-testing-library/issues/1306 )
151+ element's structure, as shown in the example below. More information can be
152+ found in the
153+ [ GitHub issue] ( https://github.com/testing-library/dom-testing-library/issues/1306 )
152154
153155``` js
154156getByRole (' paragraph' , {
@@ -171,5 +173,5 @@ message and container object as arguments.
171173
172174### ` asyncUtilTimeout `
173175
174- The global timeout value in milliseconds used by ` waitFor ` utilities. Defaults
175- to 1000ms.
176+ The global timeout value in milliseconds used by [ ` waitFor ` ] ( api-async#waitfor )
177+ utilities. Defaults to 1000ms.
0 commit comments