Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aae2bd5

Browse files
committed
Update assertions
1 parent dd5337e commit aae2bd5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/development/app-dir/missing-required-html-tags/index.test.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import {
33
assertHasRedbox,
44
assertNoRedbox,
55
getRedboxDescription,
6+
getRedboxTotalErrorCount,
7+
openRedbox,
68
retry,
79
} from 'next-test-utils'
810
import { outdent } from 'outdent'
@@ -61,7 +63,13 @@ describe('app-dir - missing required html tags', () => {
6163
)
6264
)
6365

64-
await assertHasRedbox(browser)
66+
await openRedbox(browser)
67+
// TODO(NDX-768): Should show "missing tags" error
68+
expect(await getRedboxDescription(browser)).toMatchInlineSnapshot(`
69+
"In HTML, <p> cannot be a child of <#document>.
70+
This will cause a hydration error."
71+
`)
72+
expect(await getRedboxTotalErrorCount(browser)).toBe(1)
6573

6674
// Fix the issue again
6775
await next.patchFile('app/layout.js', (code) =>

0 commit comments

Comments
 (0)