File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -321,6 +321,34 @@ Here are the accessible roles:
321
321
` )
322
322
} )
323
323
324
+ test ( 'does not include the container in the queryable roles' , ( ) => {
325
+ const { getByRole} = render ( `<li />` , {
326
+ container : document . createElement ( 'ul' ) ,
327
+ } )
328
+ expect ( ( ) => getByRole ( 'list' ) ) . toThrowErrorMatchingInlineSnapshot ( `
329
+ "Unable to find an accessible element with the role "list"
330
+
331
+ Here are the accessible roles:
332
+
333
+ list:
334
+
335
+ Name "":
336
+ <ul />
337
+
338
+ --------------------------------------------------
339
+ listitem:
340
+
341
+ Name "":
342
+ <li />
343
+
344
+ --------------------------------------------------
345
+
346
+ <ul>
347
+ <li />
348
+ </ul>"
349
+ ` )
350
+ } )
351
+
324
352
describe ( 'configuration' , ( ) => {
325
353
let originalConfig
326
354
beforeEach ( ( ) => {
You can’t perform that action at this time.
0 commit comments