diff --git a/test/integration/build-warnings/test/index.test.js b/test/integration/build-warnings/test/index.test.js index c3a54966833b1..fe3f54f960af6 100644 --- a/test/integration/build-warnings/test/index.test.js +++ b/test/integration/build-warnings/test/index.test.js @@ -14,37 +14,47 @@ describe('Build warnings', () => { const { stderr } = await nextBuild(appDir, undefined, { stderr: true }) expect(stderr).not.toContain('optimization has been disabled') }) + ;(process.env.TURBOPACK ? it.skip : it)( + 'should shown warning about minification for minimize', + async () => { + const nextConfig = new File(join(appDir, 'next.config.js')) - it('should shown warning about minification for minimize', async () => { - const nextConfig = new File(join(appDir, 'next.config.js')) + await waitFor(500) - await waitFor(500) + nextConfig.replace('true', 'false') - nextConfig.replace('true', 'false') + const { stderr } = await nextBuild(appDir, undefined, { + stderr: true, + }) - const { stderr } = await nextBuild(appDir, undefined, { stderr: true }) - - expect(stderr).toContain('optimization has been disabled') - - nextConfig.restore() - }) + // eslint-disable-next-line jest/no-standalone-expect + expect(stderr).toContain('optimization has been disabled') - it('should shown warning about minification for minimizer', async () => { - const nextConfig = new File(join(appDir, 'next.config.js')) + nextConfig.restore() + } + ) + ;(process.env.TURBOPACK ? it.skip : it)( + 'should shown warning about minification for minimizer', + async () => { + const nextConfig = new File(join(appDir, 'next.config.js')) - await waitFor(500) + await waitFor(500) - nextConfig.replace( - 'config.optimization.minimize = true', - 'config.optimization.minimizer = []' - ) + nextConfig.replace( + 'config.optimization.minimize = true', + 'config.optimization.minimizer = []' + ) - const { stderr } = await nextBuild(appDir, undefined, { stderr: true }) + const { stderr } = await nextBuild(appDir, undefined, { + stderr: true, + }) - expect(stderr).toContain('optimization has been disabled') + // eslint-disable-next-line jest/no-standalone-expect + expect(stderr).toContain('optimization has been disabled') - nextConfig.restore() - }) + nextConfig.restore() + } + ) it('should not warn about missing cache in non-CI', async () => { await remove(join(appDir, '.next')) diff --git a/test/turbopack-build-tests-manifest.json b/test/turbopack-build-tests-manifest.json index a5263d1653df7..d2016985cef9f 100644 --- a/test/turbopack-build-tests-manifest.json +++ b/test/turbopack-build-tests-manifest.json @@ -7326,11 +7326,11 @@ "Build warnings production mode should not warn about missing cache on supported platforms", "Build warnings production mode should warn about missing cache in CI" ], - "failed": [ + "failed": [], + "pending": [ "Build warnings production mode should shown warning about minification for minimize", "Build warnings production mode should shown warning about minification for minimizer" ], - "pending": [], "flakey": [], "runtimeError": false },