Skip to content

Commit

Permalink
update pages-dir test for React 18 assertions (#69759)
Browse files Browse the repository at this point in the history
Matches the same guard we added in [`f06d21e`
(#69484)](f06d21e)
  • Loading branch information
ztanner authored Sep 5, 2024
1 parent f7a2265 commit d2eaa44
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions test/production/pages-dir/production/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ if (process.env.TEST_WASM) {
jest.setTimeout(120 * 1000)
}

const isReact18 = true

describe('Production Usage', () => {
const { next } = nextTestSetup({
files: path.join(__dirname, '../fixture'),
Expand Down Expand Up @@ -181,7 +183,9 @@ describe('Production Usage', () => {
/webpack-runtime\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
/node_modules\/react\/cjs\/react\.production\.js/,
isReact18
? /node_modules\/react\/cjs\/react\.production\.min\.js/
: /node_modules\/react\/cjs\/react\.production\.js/,
],
notTests: [/\0/, /\?/, /!/],
},
Expand All @@ -192,7 +196,9 @@ describe('Production Usage', () => {
/chunks\/.*?\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
/node_modules\/react\/cjs\/react\.production\.js/,
isReact18
? /node_modules\/react\/cjs\/react\.production\.min\.js/
: /node_modules\/react\/cjs\/react\.production\.js/,
/node_modules\/next/,
],
notTests: [/\0/, /\?/, /!/],
Expand All @@ -204,7 +210,9 @@ describe('Production Usage', () => {
/chunks\/.*?\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
/node_modules\/react\/cjs\/react\.production\.js/,
isReact18
? /node_modules\/react\/cjs\/react\.production\.min\.js/
: /node_modules\/react\/cjs\/react\.production\.js/,
/node_modules\/next/,
/node_modules\/nanoid\/index\.js/,
/node_modules\/nanoid\/url-alphabet\/index\.js/,
Expand All @@ -219,7 +227,9 @@ describe('Production Usage', () => {
/chunks\/.*?\.js/,
/node_modules\/react\/index\.js/,
/node_modules\/react\/package\.json/,
/node_modules\/react\/cjs\/react\.production\.js/,
isReact18
? /node_modules\/react\/cjs\/react\.production\.min\.js/
: /node_modules\/react\/cjs\/react\.production\.js/,
/node_modules\/next/,
],
notTests: [
Expand Down

0 comments on commit d2eaa44

Please # to comment.