diff --git a/run-tests.js b/run-tests.js index 6d675fa4c18ab..18973aa3f5727 100644 --- a/run-tests.js +++ b/run-tests.js @@ -398,23 +398,16 @@ ${tests.map((t) => t.file).join('\n')} ${ENDGROUP}`) console.log(`total: ${tests.length}`) - const hasIsolatedTests = tests.some((test) => { - return configuredTestTypes.some( - (type) => - type !== testFilters.unit && test.file.startsWith(`test/${type}`) - ) - }) - if ( !options.dry && - process.platform !== 'win32' && process.env.NEXT_TEST_MODE !== 'deploy' && - ((options.type && options.type !== 'unit') || hasIsolatedTests) + ((options.type && options.type !== 'unit') || + tests.some((test) => !testFilters.unit.test(test.file))) ) { - // for isolated next tests: e2e, dev, prod we create - // a starter Next.js install to re-use to speed up tests - // to avoid having to run yarn each time - console.log(`${GROUP}Creating Next.js install for isolated tests`) + // For isolated next tests (e2e, dev, prod) and integration tests we create + // a starter Next.js install to re-use to speed up tests to avoid having to + // run `pnpm install` each time. + console.log(`${GROUP}Creating shared Next.js install`) const reactVersion = process.env.NEXT_TEST_REACT_VERSION || '19.0.0-rc.0' const { installDir, pkgPaths, tmpRepoDir } = await createNextInstall({ parentSpan: mockTrace(),