[test] Use `@force-gate`

parent a92d806a
...@@ -6,9 +6,8 @@ import { basePath, url } from './base-path' ...@@ -6,9 +6,8 @@ import { basePath, url } from './base-path'
// Variants are supported with Turbopack only, and enabling them rejects a // Variants are supported with Turbopack only, and enabling them rejects a
// webpack build, which `variants-webpack.test.ts` covers. // webpack build, which `variants-webpack.test.ts` covers.
;(process.env.IS_TURBOPACK_TEST ? describe : describe.skip)( // @force-gate turbopack
'variants with a cache lifetime per combination', describe('variants with a cache lifetime per combination', () => {
() => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname + '/fixtures/cache-lifetime', files: __dirname + '/fixtures/cache-lifetime',
// TODO(variants): enable this for a deployment. A platform serves a // TODO(variants): enable this for a deployment. A platform serves a
...@@ -106,5 +105,4 @@ import { basePath, url } from './base-path' ...@@ -106,5 +105,4 @@ import { basePath, url } from './base-path'
}) })
}) })
} }
} })
)
...@@ -2,9 +2,8 @@ import { isNextDev, nextTestSetup } from 'e2e-utils' ...@@ -2,9 +2,8 @@ import { isNextDev, nextTestSetup } from 'e2e-utils'
// Variants are supported with Turbopack only, and enabling them rejects a // Variants are supported with Turbopack only, and enabling them rejects a
// webpack build, which `variants-webpack.test.ts` covers. // webpack build, which `variants-webpack.test.ts` covers.
;(process.env.IS_TURBOPACK_TEST ? describe : describe.skip)( // @force-gate turbopack
'variants with a variant read above every boundary', describe('variants with a variant read above every boundary', () => {
() => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname + '/fixtures/empty-shell', files: __dirname + '/fixtures/empty-shell',
// Every route of this fixture exists to fail the build, so the harness // Every route of this fixture exists to fail the build, so the harness
...@@ -60,5 +59,4 @@ import { isNextDev, nextTestSetup } from 'e2e-utils' ...@@ -60,5 +59,4 @@ import { isNextDev, nextTestSetup } from 'e2e-utils'
) )
} }
) )
} })
)
...@@ -3,9 +3,8 @@ import { retry } from 'next-test-utils' ...@@ -3,9 +3,8 @@ import { retry } from 'next-test-utils'
// Variants are supported with Turbopack only, and enabling them rejects a // Variants are supported with Turbopack only, and enabling them rejects a
// webpack build, which `variants-webpack.test.ts` covers. // webpack build, which `variants-webpack.test.ts` covers.
;(process.env.IS_TURBOPACK_TEST ? describe : describe.skip)( // @force-gate turbopack
'variants on an upgraded fallback shell', describe('variants on an upgraded fallback shell', () => {
() => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname + '/fixtures/fallback-upgrade', files: __dirname + '/fixtures/fallback-upgrade',
// TODO(variants): enable this for a deployment. A platform serves a // TODO(variants): enable this for a deployment. A platform serves a
...@@ -59,5 +58,4 @@ import { retry } from 'next-test-utils' ...@@ -59,5 +58,4 @@ import { retry } from 'next-test-utils'
}) })
} }
}) })
} })
)
...@@ -6,9 +6,8 @@ const expectedError = ...@@ -6,9 +6,8 @@ const expectedError =
// Variants are supported with Turbopack only, so a webpack build rejects the // Variants are supported with Turbopack only, so a webpack build rejects the
// config of this fixture before it reads the middleware file. // config of this fixture before it reads the middleware file.
;(process.env.IS_TURBOPACK_TEST ? describe : describe.skip)( // @force-gate turbopack
'variants in a middleware file', describe('variants in a middleware file', () => {
() => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname + '/fixtures/middleware-file', files: __dirname + '/fixtures/middleware-file',
// The fixture exists to fail, so the harness must not build or start it. // The fixture exists to fail, so the harness must not build or start it.
...@@ -45,5 +44,4 @@ const expectedError = ...@@ -45,5 +44,4 @@ const expectedError =
expect(cliOutput).toContain(expectedError) expect(cliOutput).toContain(expectedError)
}) })
} }
} })
)
...@@ -5,9 +5,8 @@ const DECLARED = '/declared' ...@@ -5,9 +5,8 @@ const DECLARED = '/declared'
// Variants are supported with Turbopack only, and enabling them rejects a // Variants are supported with Turbopack only, and enabling them rejects a
// webpack build, which `variants-webpack.test.ts` covers. // webpack build, which `variants-webpack.test.ts` covers.
;(process.env.IS_TURBOPACK_TEST ? describe : describe.skip)( // @force-gate turbopack
'variants with a param the build did not name', describe('variants with a param the build did not name', () => {
() => {
const { next, skipped } = nextTestSetup({ const { next, skipped } = nextTestSetup({
files: __dirname + '/fixtures/on-demand-param', files: __dirname + '/fixtures/on-demand-param',
// TODO(variants): enable this for a deployment. A platform serves a // TODO(variants): enable this for a deployment. A platform serves a
...@@ -69,5 +68,4 @@ const DECLARED = '/declared' ...@@ -69,5 +68,4 @@ const DECLARED = '/declared'
cachedSentinel: $('#cached-sentinel').text(), cachedSentinel: $('#cached-sentinel').text(),
}).toEqual({ slug: 'built', theme: 'dark', cachedSentinel: 'buildtime' }) }).toEqual({ slug: 'built', theme: 'dark', cachedSentinel: 'buildtime' })
}) })
} })
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment