diff --git a/test/integration/typescript-filtered-files/test/index.test.js b/test/integration/typescript-filtered-files/test/index.test.ts similarity index 100% rename from test/integration/typescript-filtered-files/test/index.test.js rename to test/integration/typescript-filtered-files/test/index.test.ts diff --git a/test/integration/typescript-hmr/test/index.test.js b/test/integration/typescript-hmr/test/index.test.ts similarity index 90% rename from test/integration/typescript-hmr/test/index.test.js rename to test/integration/typescript-hmr/test/index.test.ts index 1249349bc9ac0..effa97fa3a7e8 100644 --- a/test/integration/typescript-hmr/test/index.test.js +++ b/test/integration/typescript-hmr/test/index.test.ts @@ -24,7 +24,7 @@ describe('TypeScript HMR', () => { // Events can be finicky in CI. This switches to a more reliable // polling method. CHOKIDAR_USEPOLLING: 'true', - CHOKIDAR_INTERVAL: 500, + CHOKIDAR_INTERVAL: '500', }, }) }) @@ -102,18 +102,10 @@ describe('TypeScript HMR', () => { await new Promise((resolve) => setTimeout(resolve, 500)) } await fs.writeFile(pagePath, errContent) - const res = await check( - async () => { - const html = await browser.eval( - 'document.querySelector("p").innerText' - ) - return html.match(/hello with error/) ? 'success' : 'fail' - }, - /success/, - false - ) - - expect(res).toBe(true) + await check(async () => { + const html = await browser.eval('document.querySelector("p").innerText') + return html.match(/hello with error/) ? 'success' : 'fail' + }, /success/) } finally { if (browser) browser.close() await fs.writeFile(pagePath, origContent) diff --git a/test/integration/typescript-ignore-errors/test/index.test.js b/test/integration/typescript-ignore-errors/test/index.test.ts similarity index 100% rename from test/integration/typescript-ignore-errors/test/index.test.js rename to test/integration/typescript-ignore-errors/test/index.test.ts diff --git a/test/integration/typescript-only-remove-type-imports/test/index.test.js b/test/integration/typescript-only-remove-type-imports/test/index.test.ts similarity index 100% rename from test/integration/typescript-only-remove-type-imports/test/index.test.js rename to test/integration/typescript-only-remove-type-imports/test/index.test.ts diff --git a/test/integration/typescript-paths/test/index.test.js b/test/integration/typescript-paths/test/index.test.ts similarity index 98% rename from test/integration/typescript-paths/test/index.test.js rename to test/integration/typescript-paths/test/index.test.ts index aeb3c297dd627..d8f0f18188614 100644 --- a/test/integration/typescript-paths/test/index.test.js +++ b/test/integration/typescript-paths/test/index.test.ts @@ -16,7 +16,7 @@ const appDir = join(__dirname, '..') let appPort let app -async function get$(path, query) { +async function get$(path, query?: any) { const html = await renderViaHTTP(appPort, path, query) return cheerio.load(html) } diff --git a/test/integration/typescript-workspaces-paths/packages/www/test/index.test.js b/test/integration/typescript-workspaces-paths/packages/www/test/index.test.ts similarity index 97% rename from test/integration/typescript-workspaces-paths/packages/www/test/index.test.js rename to test/integration/typescript-workspaces-paths/packages/www/test/index.test.ts index f7100467a1462..5d7c6ff11f023 100644 --- a/test/integration/typescript-workspaces-paths/packages/www/test/index.test.js +++ b/test/integration/typescript-workspaces-paths/packages/www/test/index.test.ts @@ -8,7 +8,7 @@ const appDir = join(__dirname, '..') let appPort let app -async function get$(path, query) { +async function get$(path, query?: any) { const html = await renderViaHTTP(appPort, path, query) return cheerio.load(html) } diff --git a/test/integration/typescript-workspaces-paths/tsconfig.json b/test/integration/typescript-workspaces-paths/tsconfig.json index 7e3c7e3e2d3a2..abae98debe7b4 100644 --- a/test/integration/typescript-workspaces-paths/tsconfig.json +++ b/test/integration/typescript-workspaces-paths/tsconfig.json @@ -27,5 +27,6 @@ "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true - } + }, + "exclude": ["node_modules", "**/*.test.ts", "**/*.test.tsx"] } diff --git a/test/integration/undefined-webpack-config/test/index.test.js b/test/integration/undefined-webpack-config/test/index.test.ts similarity index 94% rename from test/integration/undefined-webpack-config/test/index.test.js rename to test/integration/undefined-webpack-config/test/index.test.ts index 5563bdc4c6f6c..e50d13c602dac 100644 --- a/test/integration/undefined-webpack-config/test/index.test.js +++ b/test/integration/undefined-webpack-config/test/index.test.ts @@ -31,9 +31,6 @@ const expectedErr = onStderr(msg) { output += msg || '' }, - ontStdout(msg) { - output += msg || '' - }, }) expect(output).toMatch(expectedErr) diff --git a/test/integration/webpack-bun-externals/test/index.test.js b/test/integration/webpack-bun-externals/test/index.test.ts similarity index 100% rename from test/integration/webpack-bun-externals/test/index.test.js rename to test/integration/webpack-bun-externals/test/index.test.ts diff --git a/test/integration/webpack-config-extensionalias/test/index.test.js b/test/integration/webpack-config-extensionalias/test/index.test.ts similarity index 100% rename from test/integration/webpack-config-extensionalias/test/index.test.js rename to test/integration/webpack-config-extensionalias/test/index.test.ts diff --git a/test/integration/webpack-config-mainjs/test/index.test.js b/test/integration/webpack-config-mainjs/test/index.test.ts similarity index 100% rename from test/integration/webpack-config-mainjs/test/index.test.js rename to test/integration/webpack-config-mainjs/test/index.test.ts diff --git a/test/integration/webpack-require-hook/test/index.test.js b/test/integration/webpack-require-hook/test/index.test.ts similarity index 100% rename from test/integration/webpack-require-hook/test/index.test.js rename to test/integration/webpack-require-hook/test/index.test.ts diff --git a/test/integration/with-electron/test/index.test.js b/test/integration/with-electron/test/index.test.ts similarity index 100% rename from test/integration/with-electron/test/index.test.js rename to test/integration/with-electron/test/index.test.ts diff --git a/test/integration/worker-webpack5/test/index.test.js b/test/integration/worker-webpack5/test/index.test.ts similarity index 100% rename from test/integration/worker-webpack5/test/index.test.js rename to test/integration/worker-webpack5/test/index.test.ts diff --git a/test/production/jest/rsc/lib/utils.test.js b/test/production/jest/rsc/lib/utils.test.ts similarity index 100% rename from test/production/jest/rsc/lib/utils.test.js rename to test/production/jest/rsc/lib/utils.test.ts