mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
See https://github.com/vercel/next.js/pull/95553 for an explanation of why we want to split these up. TL;DR it makes CI faster and saves us some money. In CI we have to run tests at the suite/file granularity, so if a test suite is too long it limits parallelism and if it has to be retried, we have to retry the full suite.
41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { isNextDev, nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('Cache Components Errors', () => {
|
|
const { next, skipped } = nextTestSetup({
|
|
files: __dirname + '/fixtures/unstable-deprecations',
|
|
})
|
|
|
|
if (skipped) {
|
|
return
|
|
}
|
|
|
|
describe('Deprecating `unstable` prefix for `cacheLife` and `cacheTag`', () => {
|
|
it('warns if you use `cacheLife` through `unstable_cacheLife`', async () => {
|
|
if (isNextDev) {
|
|
await next.browser('/life')
|
|
|
|
expect(next.cliOutput).toContain(
|
|
'Error: `unstable_cacheLife` was recently stabilized'
|
|
)
|
|
} else {
|
|
expect(next.cliOutput).toContain(
|
|
'Error: `unstable_cacheLife` was recently stabilized'
|
|
)
|
|
}
|
|
})
|
|
it('warns if you use `cacheTag` through `unstable_cacheTag`', async () => {
|
|
if (isNextDev) {
|
|
await next.browser('/tag')
|
|
|
|
expect(next.cliOutput).toContain(
|
|
'Error: `unstable_cacheTag` was recently stabilized'
|
|
)
|
|
} else {
|
|
expect(next.cliOutput).toContain(
|
|
'Error: `unstable_cacheTag` was recently stabilized'
|
|
)
|
|
}
|
|
})
|
|
})
|
|
})
|