Skip to content

Commit 7c2bb98

Browse files
committed
Fix deployment tests
1 parent 4453d20 commit 7c2bb98

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/production/next-server-nft/next-server-nft.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@ import { nextTestSetup } from 'e2e-utils'
22
import path from 'path'
33
import fs from 'fs'
44

5+
const isReact18 = parseInt(process.env.NEXT_TEST_REACT_VERSION) === 18
6+
57
// Only run this test for Turbopack as it is more conservative (i.e. aggressive) in including
68
// referenced files and might include too many. (The Webpack snapshots would different slightly from
79
// the Turbopack ones below.)
810
//
911
// This test is not meant for testing correctness (which is done by the behavioral tests), but as a
1012
// regression test to ensure that some stray `path.join` doesn't cause all of the Next.js package to
1113
// get included.
12-
;(process.env.IS_TURBOPACK_TEST ? describe : describe.skip)(
14+
//
15+
// Also skip alternate React versions, as they would require different snapshots.
16+
;(process.env.IS_TURBOPACK_TEST && !isReact18 ? describe : describe.skip)(
1317
'next-server-nft',
1418
() => {
1519
const { next, skipped } = nextTestSetup({

0 commit comments

Comments
 (0)