Files
vercel__next.js/test/e2e/app-dir/cache-components-create-component-tree/cache-components-create-component-tree.test.ts
Josh Story e0966df114 test: migrate caching deploy exclusions to force gates (#98154)
## Summary

- migrate Cache Components, PPR, prefetching, prerendering,
revalidation, and SSG deployment exclusions to `@force-gate`
- remove the corresponding `skipDeployment` options and `skipped`
control flow while preserving each suite's rationale

This keeps caching-related exclusions together so their deployed
semantics can be reviewed by the same owners.

## Verification

- verified on the combined top-of-stack tree with `pnpm typescript`
- compared ordinary-mode collection before and after: all 4,670 existing
test names matched
- collected all 510 affected files in deploy mode: 4,578 skipped tests,
zero failures

<!-- NEXT_JS_LLM -->
2026-09-09 08:25:36 -07:00

34 lines
1.2 KiB
TypeScript

import { isNextDev, nextTestSetup } from 'e2e-utils'
import { waitForNoRedbox } from 'next-test-utils'
// TODO(deploy-test-completion): Re-enable this suite in deploy mode.
// It likely asserts local CLI or runtime output that deploy tests do not expose.
// @force-gate !deploy
describe('hello-world', () => {
const { next } = nextTestSetup({
files: __dirname,
skipStart: !isNextDev,
})
if (isNextDev) {
it('should not indicate there is an error when incidental math.random calls occur during component tree generation during dev', async () => {
const browser = await next.browser('/')
await waitForNoRedbox(browser)
// The redbox assertion is currently unreliable in this test and so this is an additional check to ensure the CLI didn't print anything with `Math.random()` in it.
expect(next.cliOutput).not.toContain('Math.random()')
})
} else {
it('should not indicate there is an error when incidental math.random calls occur during component tree generation during build', async () => {
try {
await next.build()
} catch (e) {
console.error('Expected build to Succeed, but it failed.')
throw e
}
expect(next.cliOutput).not.toContain('Math.random()')
})
}
})