diff --git a/.configs/vitest.config.mjs b/.configs/vitest.config.mjs index fd5fc29..6665771 100644 --- a/.configs/vitest.config.mjs +++ b/.configs/vitest.config.mjs @@ -7,7 +7,7 @@ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); export default defineConfig({ root, test: { - include: ["tests/**/*.test.mjs"], + include: ["tests/**/*.test.vitest.mjs"], exclude: ["node_modules"], environment: "node", testTimeout: 30000, diff --git a/tests/port-fallback.test.mjs b/tests/port-fallback.test.vitest.mjs similarity index 96% rename from tests/port-fallback.test.mjs rename to tests/port-fallback.test.vitest.mjs index af99ee3..d80ccff 100644 --- a/tests/port-fallback.test.mjs +++ b/tests/port-fallback.test.vitest.mjs @@ -4,7 +4,7 @@ * const port = process.env.PORT || 3000; * app.listen(port, '0.0.0.0', () => console.log(`WOL proxy on port ${port}`)); * - * `tests/wake-endpoint.test.mjs` covers the `process.env.PORT` (truthy) branch by + * `tests/wake-endpoint.test.vitest.mjs` covers the `process.env.PORT` (truthy) branch by * setting `PORT=0` for an ephemeral real bind. This file covers the `|| 3000` * fallback branch (PORT unset) in a separate process (the OOM-safe runner spawns * one vitest child process per test file, so env vars and the CJS `require.cache` diff --git a/tests/run-vitest.mjs b/tests/run-vitest.mjs index d6c32ba..8dbdb5e 100644 --- a/tests/run-vitest.mjs +++ b/tests/run-vitest.mjs @@ -26,7 +26,7 @@ const code = await run({ cwd: root, testDir: "tests", vitestConfig: ".configs/vitest.config.mjs", - testFilePattern: /\.test\.mjs$/, + testFilePattern: /\.test\.vitest\.mjs$/, testPatterns, workers, coverageQuiet, diff --git a/tests/wake-endpoint.test.mjs b/tests/wake-endpoint.test.vitest.mjs similarity index 100% rename from tests/wake-endpoint.test.mjs rename to tests/wake-endpoint.test.vitest.mjs