Skip to content

Commit

Permalink
force set env for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Feb 13, 2025
1 parent e77689e commit 68ba516
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { nextTestSetup } from 'e2e-utils'

// TODO: remove this env once streaming metadata is available for ppr
process.env.__NEXT_EXPERIMENTAL_PPR = 'true'

describe('app-dir - metadata-streaming-config-customized', () => {
const { next } = nextTestSetup({
files: __dirname,
Expand All @@ -15,13 +18,6 @@ describe('app-dir - metadata-streaming-config-customized', () => {
`,
},
})
// TODO: remove this env once streaming metadata is available for ppr
beforeAll(() => {
process.env.__NEXT_EXPERIMENTAL_PPR = 'true'
})
afterAll(() => {
delete process.env.__NEXT_EXPERIMENTAL_PPR
})

it('should have the customized streaming metadata config output in routes-manifest.json', async () => {
const prerenderManifest = JSON.parse(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import { nextTestSetup } from 'e2e-utils'

// TODO: remove this env once streaming metadata is available for ppr
process.env.__NEXT_EXPERIMENTAL_PPR = 'true'

describe('app-dir - metadata-streaming-config', () => {
const { next } = nextTestSetup({
files: __dirname,
})

// TODO: remove this env once streaming metadata is available for ppr
beforeAll(() => {
process.env.__NEXT_EXPERIMENTAL_PPR = 'true'
})
afterAll(() => {
delete process.env.__NEXT_EXPERIMENTAL_PPR
})

it('should have the default streaming metadata config output in routes-manifest.json', async () => {
const requiredServerFiles = JSON.parse(
await next.readFile('.next/required-server-files.json')
Expand Down

0 comments on commit 68ba516

Please sign in to comment.