Unverified Commit 14c93768 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

BREAKING CHANGE: Remove React 17 (#41629)

Next.js 13 will require React 18.

In this PR I've only updated the peerDependency and removed the test runs in GH actions. Further cleanup will follow later, this allows us to remove the code supporting it later.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
Co-authored-by: 's avatarJiachi Liu <4800338+huozhi@users.noreply.github.com>
parent 7102050e
This diff is collapsed.
process.env.__NEXT_REACT_CHANNEL = 'exp'
process.env.NODE_ENV = 'production' process.env.NODE_ENV = 'production'
require('../../test/lib/react-channel-require-hook') require('../../test/lib/react-channel-require-hook')
......
...@@ -10,6 +10,8 @@ The [Supported Browsers](/docs/basic-features/supported-browsers-features.md) ha ...@@ -10,6 +10,8 @@ The [Supported Browsers](/docs/basic-features/supported-browsers-features.md) ha
The minimum Node.js version has been bumped from 12.22.0 to 14.0.0, since 12.x has reached end-of-life. The minimum Node.js version has been bumped from 12.22.0 to 14.0.0, since 12.x has reached end-of-life.
The minimum React version has been bumped from 17.0.2 to 18.2.0.
The `swcMinify` configuration property was changed from `false` to `true`. See [Next.js Compiler](/docs/advanced-features/compiler.md) for more info. The `swcMinify` configuration property was changed from `false` to `true`. See [Next.js Compiler](/docs/advanced-features/compiler.md) for more info.
The `next/image` import was renamed to `next/legacy/image`. The `next/future/image` import was renamed to `next/image`. The `next/image` import was renamed to `next/legacy/image`. The `next/future/image` import was renamed to `next/image`.
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
"@stytch/stytch-react": "^3.0.3", "@stytch/stytch-react": "^3.0.3",
"next": "12.0.7", "next": "12.0.7",
"next-iron-session": "^4.2.0", "next-iron-session": "^4.2.0",
"react": "17.0.2", "react": "18.2.0",
"react-dom": "17.0.2", "react-dom": "18.2.0",
"stytch": "^3.6.1" "stytch": "^3.6.1"
}, },
"devDependencies": { "devDependencies": {
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
"date-fns": "2.28.0", "date-fns": "2.28.0",
"next": "latest", "next": "latest",
"next-drupal": "latest", "next-drupal": "latest",
"react": "17.0.2", "react": "18.2.0",
"react-dom": "17.0.2" "react-dom": "18.2.0"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "10.4.2", "autoprefixer": "10.4.2",
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
"@keystone-next/fields": "^9.0.0", "@keystone-next/fields": "^9.0.0",
"@keystone-next/keystone": "^18.0.0", "@keystone-next/keystone": "^18.0.0",
"next": "10.2.2", "next": "10.2.2",
"react": "17.0.2", "react": "18.2.0",
"react-dom": "17.0.2" "react-dom": "18.2.0"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "^17.0.6", "@types/react": "^17.0.6",
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
}, },
"dependencies": { "dependencies": {
"next": "latest", "next": "latest",
"react": "^17.0.2", "react": "^18.2.0",
"react-dom": "^17.0.2" "react-dom": "^18.2.0"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^7.24.0", "eslint": "^7.24.0",
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"dependencies": { "dependencies": {
"@formspree/react": "latest", "@formspree/react": "latest",
"next": "latest", "next": "latest",
"react": "17.0.2", "react": "18.2.0",
"react-dom": "17.0.2" "react-dom": "18.2.0"
} }
} }
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
"dependencies": { "dependencies": {
"jotai": "1.7.3", "jotai": "1.7.3",
"next": "latest", "next": "latest",
"react": "17.0.2", "react": "18.2.0",
"react-dom": "17.0.2" "react-dom": "18.2.0"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "17.0.16", "@types/react": "17.0.16",
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"@mdx-js/react": "^1.6.18", "@mdx-js/react": "^1.6.18",
"@next/mdx": "^9.1.1", "@next/mdx": "^9.1.1",
"next": "latest", "next": "latest",
"react": "^17.0.2", "react": "^18.2.0",
"react-dom": "^17.0.2" "react-dom": "^18.2.0"
} }
} }
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
"dependencies": { "dependencies": {
"@prisma/client": "3.10.0", "@prisma/client": "3.10.0",
"next": "latest", "next": "latest",
"react": "17.0.2", "react": "18.2.0",
"react-dom": "17.0.2" "react-dom": "18.2.0"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "10.4.2", "autoprefixer": "10.4.2",
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
}, },
"dependencies": { "dependencies": {
"next": "latest", "next": "latest",
"react": "^17.0.2", "react": "^18.2.0",
"react-dom": "^17.0.2", "react-dom": "^18.2.0",
"sass": "1.26.3" "sass": "1.26.3"
} }
} }
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
}, },
"dependencies": { "dependencies": {
"next": "latest", "next": "latest",
"react": "17.0.2", "react": "18.2.0",
"react-dom": "17.0.2" "react-dom": "18.2.0"
}, },
"devDependencies": { "devDependencies": {
"@playwright/test": "^1.15.0" "@playwright/test": "^1.15.0"
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
"lint-staged": "lint-staged", "lint-staged": "lint-staged",
"next-with-deps": "./scripts/next-with-deps.sh", "next-with-deps": "./scripts/next-with-deps.sh",
"next": "node --trace-deprecation --enable-source-maps packages/next/dist/bin/next", "next": "node --trace-deprecation --enable-source-maps packages/next/dist/bin/next",
"next-react-17": "__NEXT_REACT_CHANNEL=17 node --trace-deprecation --enable-source-maps -r ./test/lib/react-channel-require-hook.js packages/next/dist/bin/next",
"next-no-sourcemaps": "node --trace-deprecation packages/next/dist/bin/next", "next-no-sourcemaps": "node --trace-deprecation packages/next/dist/bin/next",
"clean-trace-jaeger": "rm -rf test/integration/basic/.next && TRACE_TARGET=JAEGER node --trace-deprecation --enable-source-maps packages/next/dist/bin/next build test/integration/basic", "clean-trace-jaeger": "rm -rf test/integration/basic/.next && TRACE_TARGET=JAEGER node --trace-deprecation --enable-source-maps packages/next/dist/bin/next build test/integration/basic",
"debug": "node --inspect packages/next/dist/bin/next", "debug": "node --inspect packages/next/dist/bin/next",
......
...@@ -574,11 +574,7 @@ export default async function getBaseWebpackConfig( ...@@ -574,11 +574,7 @@ export default async function getBaseWebpackConfig(
// Only error in first one compiler (client) once // Only error in first one compiler (client) once
if (isClient) { if (isClient) {
if (!hasReactRoot) { if (!hasReactRoot) {
if (config.experimental.runtime) { throw new Error('Next.js requires React 18.2.0 to be installed.')
throw new Error(
'`experimental.runtime` requires React 18 to be installed.'
)
}
} }
} }
......
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
"peerDependencies": { "peerDependencies": {
"fibers": ">= 3.1.0", "fibers": ">= 3.1.0",
"node-sass": "^6.0.0 || ^7.0.0", "node-sass": "^6.0.0 || ^7.0.0",
"react": "^17.0.2 || ^18.0.0-0", "react": "^18.0.0-0",
"react-dom": "^17.0.2 || ^18.0.0-0", "react-dom": "^18.0.0-0",
"sass": "^1.3.0" "sass": "^1.3.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
......
...@@ -9,11 +9,6 @@ describe('app-dir alias handling', () => { ...@@ -9,11 +9,6 @@ describe('app-dir alias handling', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -9,11 +9,6 @@ describe('app-dir edge SSR', () => { ...@@ -9,11 +9,6 @@ describe('app-dir edge SSR', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -12,11 +12,6 @@ describe('app-dir with middleware', () => { ...@@ -12,11 +12,6 @@ describe('app-dir with middleware', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
afterAll(() => next.destroy()) afterAll(() => next.destroy())
......
...@@ -15,10 +15,6 @@ describe('app-dir static/dynamic handling', () => { ...@@ -15,10 +15,6 @@ describe('app-dir static/dynamic handling', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -11,10 +11,6 @@ describe('app-dir assetPrefix handling', () => { ...@@ -11,10 +11,6 @@ describe('app-dir assetPrefix handling', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -9,10 +9,6 @@ describe('app-dir back button download bug', () => { ...@@ -9,10 +9,6 @@ describe('app-dir back button download bug', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -21,10 +21,6 @@ describe('app dir', () => { ...@@ -21,10 +21,6 @@ describe('app dir', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
function runTests() { function runTests() {
......
...@@ -12,10 +12,6 @@ describe('app dir next-font', () => { ...@@ -12,10 +12,6 @@ describe('app dir next-font', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -11,10 +11,6 @@ describe('app dir next-image', () => { ...@@ -11,10 +11,6 @@ describe('app dir next-image', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -11,10 +11,6 @@ describe('app dir prefetching', () => { ...@@ -11,10 +11,6 @@ describe('app dir prefetching', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -5,11 +5,6 @@ import path from 'path' ...@@ -5,11 +5,6 @@ import path from 'path'
import cheerio from 'cheerio' import cheerio from 'cheerio'
describe('app dir rendering', () => { describe('app dir rendering', () => {
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
if ((global as any).isNextDeploy) { if ((global as any).isNextDeploy) {
it('should skip next deploy for now', () => {}) it('should skip next deploy for now', () => {})
return return
......
...@@ -12,10 +12,6 @@ describe('app-dir root layout', () => { ...@@ -12,10 +12,6 @@ describe('app-dir root layout', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -11,10 +11,6 @@ describe('app-dir trailingSlash handling', () => { ...@@ -11,10 +11,6 @@ describe('app-dir trailingSlash handling', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -12,10 +12,6 @@ describe('vercel analytics', () => { ...@@ -12,10 +12,6 @@ describe('vercel analytics', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
function runTests({ assetPrefix }: { assetPrefix?: boolean }) { function runTests({ assetPrefix }: { assetPrefix?: boolean }) {
......
...@@ -10,10 +10,6 @@ describe('with babel', () => { ...@@ -10,10 +10,6 @@ describe('with babel', () => {
return return
} }
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
let next: NextInstance let next: NextInstance
beforeAll(async () => { beforeAll(async () => {
......
...@@ -8,11 +8,6 @@ import escapeStringRegexp from 'escape-string-regexp' ...@@ -8,11 +8,6 @@ import escapeStringRegexp from 'escape-string-regexp'
describe('edge-render-getserversideprops', () => { describe('edge-render-getserversideprops', () => {
let next: NextInstance let next: NextInstance
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
it('should skip for react v17', () => {})
return
}
beforeAll(async () => { beforeAll(async () => {
next = await createNext({ next = await createNext({
files: new FileRef(join(__dirname, 'app')), files: new FileRef(join(__dirname, 'app')),
......
...@@ -13,7 +13,7 @@ describe('beforeInteractive in document Head', () => { ...@@ -13,7 +13,7 @@ describe('beforeInteractive in document Head', () => {
'pages/_document.js': ` 'pages/_document.js': `
import { Html, Head, Main, NextScript } from 'next/document' import { Html, Head, Main, NextScript } from 'next/document'
import Script from 'next/script' import Script from 'next/script'
export default function Document() { export default function Document() {
return ( return (
<Html> <Html>
...@@ -31,7 +31,7 @@ describe('beforeInteractive in document Head', () => { ...@@ -31,7 +31,7 @@ describe('beforeInteractive in document Head', () => {
) )
} }
`, `,
'pages/index.js': ` 'pages/index.js': `
export default function Home() { export default function Home() {
return ( return (
<> <>
...@@ -42,8 +42,8 @@ describe('beforeInteractive in document Head', () => { ...@@ -42,8 +42,8 @@ describe('beforeInteractive in document Head', () => {
`, `,
}, },
dependencies: { dependencies: {
react: '17.0.2', react: 'latest',
'react-dom': '17.0.2', 'react-dom': 'latest',
}, },
}) })
}) })
...@@ -74,7 +74,7 @@ describe('beforeInteractive in document body', () => { ...@@ -74,7 +74,7 @@ describe('beforeInteractive in document body', () => {
'pages/_document.js': ` 'pages/_document.js': `
import { Html, Head, Main, NextScript } from 'next/document' import { Html, Head, Main, NextScript } from 'next/document'
import Script from 'next/script' import Script from 'next/script'
export default function Document() { export default function Document() {
return ( return (
<Html> <Html>
...@@ -91,7 +91,7 @@ describe('beforeInteractive in document body', () => { ...@@ -91,7 +91,7 @@ describe('beforeInteractive in document body', () => {
) )
} }
`, `,
'pages/index.js': ` 'pages/index.js': `
export default function Home() { export default function Home() {
return ( return (
<> <>
...@@ -102,8 +102,8 @@ describe('beforeInteractive in document body', () => { ...@@ -102,8 +102,8 @@ describe('beforeInteractive in document body', () => {
`, `,
}, },
dependencies: { dependencies: {
react: '17.0.2', react: 'latest',
'react-dom': '17.0.2', 'react-dom': 'latest',
}, },
}) })
}) })
...@@ -149,8 +149,8 @@ describe('experimental.nextScriptWorkers: false with no Partytown dependency', ( ...@@ -149,8 +149,8 @@ describe('experimental.nextScriptWorkers: false with no Partytown dependency', (
}, },
// TODO: @housseindjirdeh: verify React 18 functionality // TODO: @housseindjirdeh: verify React 18 functionality
dependencies: { dependencies: {
react: '17.0.2', react: 'latest',
'react-dom': '17.0.2', 'react-dom': 'latest',
}, },
}) })
}) })
...@@ -182,10 +182,6 @@ describe('experimental.nextScriptWorkers: true with required Partytown dependenc ...@@ -182,10 +182,6 @@ describe('experimental.nextScriptWorkers: true with required Partytown dependenc
experimental: { experimental: {
nextScriptWorkers: true, nextScriptWorkers: true,
}, },
dependencies: {
react: '17',
'react-dom': '17',
},
}, },
files: { files: {
'pages/index.js': ` 'pages/index.js': `
...@@ -204,6 +200,8 @@ describe('experimental.nextScriptWorkers: true with required Partytown dependenc ...@@ -204,6 +200,8 @@ describe('experimental.nextScriptWorkers: true with required Partytown dependenc
`, `,
}, },
dependencies: { dependencies: {
react: 'latest',
'react-dom': 'latest',
'@builder.io/partytown': '0.4.2', '@builder.io/partytown': '0.4.2',
}, },
}) })
...@@ -261,15 +259,11 @@ describe('experimental.nextScriptWorkers: true with required Partytown dependenc ...@@ -261,15 +259,11 @@ describe('experimental.nextScriptWorkers: true with required Partytown dependenc
experimental: { experimental: {
nextScriptWorkers: true, nextScriptWorkers: true,
}, },
dependencies: {
react: '17',
'react-dom': '17',
},
}, },
files: { files: {
'pages/index.js': ` 'pages/index.js': `
import Script from 'next/script' import Script from 'next/script'
export default function Page() { export default function Page() {
return ( return (
<> <>
...@@ -281,6 +275,8 @@ describe('experimental.nextScriptWorkers: true with required Partytown dependenc ...@@ -281,6 +275,8 @@ describe('experimental.nextScriptWorkers: true with required Partytown dependenc
`, `,
}, },
dependencies: { dependencies: {
react: 'latest',
'react-dom': 'latest',
'@builder.io/partytown': '0.4.2', '@builder.io/partytown': '0.4.2',
}, },
}) })
...@@ -399,8 +395,8 @@ describe('experimental.nextScriptWorkers: true with config override', () => { ...@@ -399,8 +395,8 @@ describe('experimental.nextScriptWorkers: true with config override', () => {
}, },
dependencies: { dependencies: {
'@builder.io/partytown': '0.4.2', '@builder.io/partytown': '0.4.2',
react: '17', react: 'latest',
'react-dom': '17', 'react-dom': 'latest',
}, },
}) })
}) })
......
...@@ -9,16 +9,15 @@ const nodeArgs = ['-r', join(appDir, '../../lib/react-channel-require-hook.js')] ...@@ -9,16 +9,15 @@ const nodeArgs = ['-r', join(appDir, '../../lib/react-channel-require-hook.js')]
let appPort let appPort
let app let app
describe('Custom error page exception', () => { // TODO: re-enable with React 18
describe.skip('Custom error page exception', () => {
beforeAll(async () => { beforeAll(async () => {
await nextBuild(appDir, undefined, { await nextBuild(appDir, undefined, {
nodeArgs, nodeArgs,
env: { __NEXT_REACT_CHANNEL: '17' },
}) })
appPort = await findPort() appPort = await findPort()
app = await nextStart(appDir, appPort, { app = await nextStart(appDir, appPort, {
nodeArgs, nodeArgs,
env: { __NEXT_REACT_CHANNEL: '17' },
}) })
}) })
afterAll(() => killApp(app)) afterAll(() => killApp(app))
......
/* eslint-env jest */
import fs from 'fs-extra'
import { join } from 'path'
import { File, nextBuild } from 'next-test-utils'
const appDir = __dirname
const nodeArgs = ['-r', join(appDir, '../../lib/react-channel-require-hook.js')]
const reactDomPackagePah = join(appDir, 'node_modules/react-dom')
const nextConfig = new File(join(appDir, 'next.config.js'))
function writeNextConfig(config) {
const content = `
module.exports = { experimental: ${JSON.stringify(config)} }
`
nextConfig.write(content)
}
describe('Invalid react 18 webpack config', () => {
it('should install react 18 when `experimental.runtime` is enabled', async () => {
writeNextConfig({
runtime: 'experimental-edge',
})
const { stderr } = await nextBuild(appDir, [], {
stderr: true,
nodeArgs,
env: { __NEXT_REACT_CHANNEL: '17' },
})
nextConfig.restore()
expect(stderr).toContain(
'`experimental.runtime` requires React 18 to be installed.'
)
})
})
describe('React 17 with React 18 config', () => {
beforeAll(async () => {
await fs.mkdirp(reactDomPackagePah)
await fs.writeFile(
join(reactDomPackagePah, 'package.json'),
JSON.stringify({ name: 'react-dom', version: '17.0.0' })
)
writeNextConfig({})
})
afterAll(async () => {
await fs.remove(reactDomPackagePah)
nextConfig.restore()
})
it('suspense is not allowed in blocking rendering mode', async () => {
const { stderr, code } = await nextBuild(appDir, [], {
stderr: true,
nodeArgs,
env: {
__NEXT_REACT_CHANNEL: '17',
},
})
expect(stderr).toContain(
'Invalid suspense option usage in next/dynamic. Read more: https://nextjs.org/docs/messages/invalid-dynamic-suspense'
)
expect(code).toBe(1)
})
})
import React, { Suspense } from 'react'
import dynamic from 'next/dynamic'
const Foo = dynamic(() => import('../components/foo'), { suspense: true })
export default function Dynamic() {
return (
<Suspense>
<Foo />
</Suspense>
)
}
export default function Index() {
return 'index'
}
const mod = require('module') const mod = require('module')
// The value will be '17' or 'exp' to alias the actual react channel // The value will be '17' or 'exp' to alias the actual react channel
const reactVersion = process.env.__NEXT_REACT_CHANNEL const reactVersion = undefined
const reactDir = `react-${reactVersion}` const reactDir = `react-${reactVersion}`
const reactDomDir = `react-dom-${reactVersion}` const reactDomDir = `react-dom-${reactVersion}`
......
...@@ -5,12 +5,6 @@ import { renderViaHTTP } from 'next-test-utils' ...@@ -5,12 +5,6 @@ import { renderViaHTTP } from 'next-test-utils'
describe('next/jest', () => { describe('next/jest', () => {
let next: NextInstance let next: NextInstance
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
// react testing library is specific to react version
it('should bail on react v17', () => {})
return
}
beforeAll(async () => { beforeAll(async () => {
next = await createNext({ next = await createNext({
files: { files: {
......
...@@ -4,12 +4,6 @@ import { NextInstance } from 'test/lib/next-modes/base' ...@@ -4,12 +4,6 @@ import { NextInstance } from 'test/lib/next-modes/base'
describe('next/jest newLinkBehavior', () => { describe('next/jest newLinkBehavior', () => {
let next: NextInstance let next: NextInstance
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
// react testing library is specific to react version
it('should bail on react v17', () => {})
return
}
beforeAll(async () => { beforeAll(async () => {
next = await createNext({ next = await createNext({
files: { files: {
......
...@@ -7,12 +7,6 @@ const appDir = path.join(__dirname, 'app') ...@@ -7,12 +7,6 @@ const appDir = path.join(__dirname, 'app')
describe('next/jest', () => { describe('next/jest', () => {
let next: NextInstance let next: NextInstance
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
// react testing library is specific to react version
it('should bail on react v17', () => {})
return
}
beforeAll(async () => { beforeAll(async () => {
next = await createNext({ next = await createNext({
files: { files: {
......
...@@ -8,12 +8,6 @@ const appDir = path.join(__dirname, 'app') ...@@ -8,12 +8,6 @@ const appDir = path.join(__dirname, 'app')
describe('next/jest', () => { describe('next/jest', () => {
let next: NextInstance let next: NextInstance
if (process.env.NEXT_TEST_REACT_VERSION === '^17') {
// react testing library is specific to react version
it('should bail on react v17', () => {})
return
}
beforeAll(async () => { beforeAll(async () => {
next = await createNext({ next = await createNext({
files: { files: {
......
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