Skip to content

Commit a0ec10c

Browse files
committed
test: update test setup for stable after()
1 parent 0a6cc37 commit a0ec10c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

tests/e2e/after.test.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import { nextVersionSatisfies } from '../utils/next-version-helpers.mjs'
33
import { test } from '../utils/playwright-helpers.js'
44

55
test('next/after callback is executed and finishes', async ({ page, after }) => {
6-
test.skip(!nextVersionSatisfies('>=15.0.0'), 'This test is only for Next.js 15+')
6+
test.skip(
7+
!nextVersionSatisfies('>=15.1.0'),
8+
'This test is only for Next.js >=15.1.0 that has stable after() support',
9+
)
710

811
// trigger initial request to check page which might be stale and allow regenerating in background
912
await page.goto(`${after.url}/after/check`)

tests/fixtures/after/app/after/trigger/page.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { revalidatePath } from 'next/cache'
2-
import { unstable_after as after, connection } from 'next/server'
2+
import { after, connection } from 'next/server'
33

44
export default async function Page() {
55
await connection()

tests/fixtures/after/next.config.js

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ const nextConfig = {
44
eslint: {
55
ignoreDuringBuilds: true,
66
},
7-
experimental: {
8-
after: true,
9-
},
107
}
118

129
module.exports = nextConfig

tests/fixtures/after/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"test": {
1616
"dependencies": {
17-
"next": ">=15.0.0"
17+
"next": ">=15.1.0"
1818
}
1919
}
2020
}

0 commit comments

Comments
 (0)