Skip to content

Commit ee5fc9c

Browse files
committed
test(standalone): copy name option test over from fixture tests
1 parent 59a6c95 commit ee5fc9c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/standalone/index.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,15 @@ describe('lib/index.ts', () => {
7878
expect(text).toEqual('Hello h2')
7979
})
8080

81+
test('should handle the getBy* methods with a regex name', async () => {
82+
const document = await getDocument(page)
83+
const element = await queries.getByRole(document, 'button', {name: /getBy.*Test/})
84+
85+
const text = await page.evaluate(el => el.textContent, element)
86+
87+
expect(text).toEqual('getByRole Test')
88+
})
89+
8190
it('attaches `getNodeText`', async () => {
8291
const document = await getDocument(page)
8392
const element = await queries.getByText(document, 'Hello h1')

0 commit comments

Comments
 (0)