Skip to content

Commit 7527f23

Browse files
committed
test: add failing test for /about page
1 parent 9c45a2d commit 7527f23

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

nuxt.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ export default defineNuxtConfig({
1717
'@nuxtjs/color-mode',
1818
],
1919

20+
$test: {
21+
debug: {
22+
hydration: true,
23+
},
24+
},
25+
2026
colorMode: {
2127
preference: 'system',
2228
fallback: 'dark',

test/e2e/hydration.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ import { expect, test } from './test-utils'
33
test.describe('Hydration', () => {
44
test('/ (homepage) has no hydration mismatches', async ({ goto, hydrationErrors }) => {
55
await goto('/', { waitUntil: 'hydration' })
6-
// await goto('/about', { waitUntil: 'hydration' })
7-
// await goto('/settings', { waitUntil: 'hydration' })
6+
7+
expect(hydrationErrors).toEqual([])
8+
})
9+
10+
test('/about has no hydration mismatches', async ({ goto, hydrationErrors }) => {
11+
await goto('/about', { waitUntil: 'hydration' })
812

913
expect(hydrationErrors).toEqual([])
1014
})

0 commit comments

Comments
 (0)