Files
Shu DingandGitHub 70c6f94d95 Revert "Revert "Fix cross-worker revalidate API" (#49138)" (#49141)
Revert #49138 and split the server-ipc file into smaller modules.
2023-05-03 11:42:21 +00:00

21 lines
524 B
TypeScript

import { createNextDescribe } from 'e2e-utils'
createNextDescribe(
'app-dir revalidate',
{
files: __dirname,
skipDeployment: true,
},
({ next }) => {
it('should be able to revalidate the cache via pages/api', async () => {
const $ = await next.render$('/')
const id = $('h1').text()
const res = await next.fetch('/api/revalidate')
expect(res.status).toBe(200)
const $2 = await next.render$('/')
const id2 = $2('h1').text()
expect(id).not.toBe(id2)
})
}
)