Files
agentic-dev/vitest.scripts.config.mjs
Danijel Martinek 1883883911 test(scripts): wire scripts/**/*.test.mjs under a vitest runner
241 tests across 16 script test files were wired to NO runner (the
generators vitest config never included them and several used node:test
imports that vitest silently skips). New root vitest.scripts.config.mjs
+ pnpm test:scripts + a CI validate step run them all; node:test imports
converted to vitest keeping node:assert. Split out of 8c88a9a where a
concurrent agent's staged files were swept into the marketing-pages
commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 18:25:43 +02:00

25 lines
822 B
JavaScript

import { defineConfig } from "vitest/config";
/**
* Runner for the root scripts/ test suite (pnpm test:scripts).
*
* scripts/ is not a workspace package, so `turbo run test` never reaches
* these files — this dedicated config wires them to a runner. The suite
* runs in CI's validate job alongside the other root-level gates.
*
* Named vitest.scripts.config.mjs (not vitest.config.*) on purpose so a
* bare `vitest` invocation at the repo root does not auto-discover it.
*/
export default defineConfig({
test: {
environment: "node",
include: ["scripts/**/*.test.mjs"],
clearMocks: true,
restoreMocks: true,
// Several suites exec child node processes (work CLI, conformance
// fixtures) — keep a generous per-test ceiling.
testTimeout: 60_000,
hookTimeout: 60_000,
},
});