Unverified Commit 4e435e2f authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Skip webpack specific tests in Turbopack test run (#56877)

Looked for `webpack(config` in the test suites and disabled the ones that are testing webpack specifically. There are a few more that are not skipped as they should be implemented for Turbopack.
parent 5b52e777
...@@ -9,7 +9,10 @@ const appDir = join(__dirname, '../') ...@@ -9,7 +9,10 @@ const appDir = join(__dirname, '../')
let appPort let appPort
let app let app
describe('Handles a broken webpack plugin (precompile)', () => { // Skipped as it's not relevant to Turbopack.
;(process.env.TURBOPACK ? describe.skip : describe)(
'Handles a broken webpack plugin (precompile)',
() => {
let stderr = '' let stderr = ''
beforeAll(async () => { beforeAll(async () => {
appPort = await findPort() appPort = await findPort()
...@@ -37,4 +40,5 @@ describe('Handles a broken webpack plugin (precompile)', () => { ...@@ -37,4 +40,5 @@ describe('Handles a broken webpack plugin (precompile)', () => {
expect(stderr).toMatch('Error: oops') expect(stderr).toMatch('Error: oops')
}) })
}) }
)
...@@ -22,7 +22,8 @@ const existsChunkNamed = (name) => { ...@@ -22,7 +22,8 @@ const existsChunkNamed = (name) => {
return chunks.some((chunk) => new RegExp(name).test(chunk)) return chunks.some((chunk) => new RegExp(name).test(chunk))
} }
describe('Chunking', () => { // Skipped as it uses webpack internals / stats.json.
;(process.env.TURBOPACK ? describe.skip : describe)('Chunking', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => { ;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
beforeAll(async () => { beforeAll(async () => {
try { try {
......
...@@ -13,7 +13,10 @@ import { join } from 'path' ...@@ -13,7 +13,10 @@ import { join } from 'path'
const appDir = join(__dirname, '../') const appDir = join(__dirname, '../')
describe('devtool set in development mode in next config', () => { // Webpack specific config tests.
;(process.env.TURBOPACK ? describe.skip : describe)(
'devtool set in development mode in next config',
() => {
it('should warn and revert when a devtool is set in development mode', async () => { it('should warn and revert when a devtool is set in development mode', async () => {
let stderr = '' let stderr = ''
...@@ -53,4 +56,5 @@ describe('devtool set in development mode in next config', () => { ...@@ -53,4 +56,5 @@ describe('devtool set in development mode in next config', () => {
await killApp(app) await killApp(app)
expect(found).toBeTruthy() expect(found).toBeTruthy()
}) })
}) }
)
...@@ -14,14 +14,20 @@ let appPort ...@@ -14,14 +14,20 @@ let appPort
let app let app
let devOutput let devOutput
describe('svgo-webpack with Image Component', () => { // Skip as this is a webpack specific test.
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => { ;(process.env.TURBOPACK ? describe.skip : describe)(
'svgo-webpack with Image Component',
() => {
;(process.env.TURBOPACK ? describe.skip : describe)(
'production mode',
() => {
it('should not fail to build invalid usage of the Image component', async () => { it('should not fail to build invalid usage of the Image component', async () => {
const { stderr, code } = await nextBuild(appDir, [], { stderr: true }) const { stderr, code } = await nextBuild(appDir, [], { stderr: true })
expect(stderr).toBeFalsy() expect(stderr).toBeFalsy()
expect(code).toBe(0) expect(code).toBe(0)
}) })
}) }
)
describe('development mode', () => { describe('development mode', () => {
beforeAll(async () => { beforeAll(async () => {
...@@ -43,4 +49,5 @@ describe('svgo-webpack with Image Component', () => { ...@@ -43,4 +49,5 @@ describe('svgo-webpack with Image Component', () => {
expect(devOutput.stderr).toBeFalsy() expect(devOutput.stderr).toBeFalsy()
}) })
}) })
}) }
)
...@@ -14,8 +14,13 @@ let appPort ...@@ -14,8 +14,13 @@ let appPort
let app let app
let devOutput let devOutput
describe('svgo-webpack with Image Component', () => { // Skip as this is a webpack specific test.
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => { ;(process.env.TURBOPACK ? describe.skip : describe)(
'svgo-webpack with Image Component',
() => {
;(process.env.TURBOPACK ? describe.skip : describe)(
'production mode',
() => {
it('should not fail to build invalid usage of the Image component', async () => { it('should not fail to build invalid usage of the Image component', async () => {
const { stderr, code } = await nextBuild(appDir, [], { stderr: true }) const { stderr, code } = await nextBuild(appDir, [], { stderr: true })
const errors = stderr const errors = stderr
...@@ -24,7 +29,8 @@ describe('svgo-webpack with Image Component', () => { ...@@ -24,7 +29,8 @@ describe('svgo-webpack with Image Component', () => {
expect(errors).toEqual([]) expect(errors).toEqual([])
expect(code).toBe(0) expect(code).toBe(0)
}) })
}) }
)
describe('development mode', () => { describe('development mode', () => {
beforeAll(async () => { beforeAll(async () => {
...@@ -49,4 +55,5 @@ describe('svgo-webpack with Image Component', () => { ...@@ -49,4 +55,5 @@ describe('svgo-webpack with Image Component', () => {
expect(errors).toEqual([]) expect(errors).toEqual([])
}) })
}) })
}) }
)
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