mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
These tests won't ever be run in a deployed environment, so this removes `skipDeployment` so it's easier to grok which tests are intentionally disabled because they don't work when deployed.
22 lines
523 B
TypeScript
22 lines
523 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('app-dir revalidate', () => {
|
|
const { next, skipped } = nextTestSetup({
|
|
files: __dirname,
|
|
})
|
|
|
|
if (skipped) {
|
|
return
|
|
}
|
|
|
|
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)
|
|
})
|
|
})
|