Skip to content

Commit 8931bc2

Browse files
committed
test: add a test
1 parent 7e29036 commit 8931bc2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/browser/fixtures/expect-dom/toBeInTheDocument.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { expect, test } from 'vitest'
2+
import { page } from 'vitest/browser'
23

34
test('.toBeInTheDocument', () => {
45
const window = document.defaultView
@@ -35,6 +36,8 @@ test('.toBeInTheDocument', () => {
3536
expect(detachedElement).not.toBeInTheDocument()
3637
expect(nullElement).not.toBeInTheDocument()
3738

39+
expect(page.getByTestId('non-existing')).not.toBeInTheDocument()
40+
3841
// negative test cases wrapped in throwError assertions for coverage.
3942
const expectToBe = /expect.*\.toBeInTheDocument/
4043
const expectNotToBe = /expect.*not\.toBeInTheDocument/

0 commit comments

Comments
 (0)