test(generators): run release-please-utils tests under vitest

The file was doubly dead: the vitest include lacked lib/*.test.mjs and
the file imported node:test, so no runner ever executed it. The include
now picks up lib .mjs tests and the imports move to vitest (node:assert
keeps the original assertion style) — all 5 assertions live. (S5)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-10 17:23:06 +02:00
parent 2747feab46
commit dcbf782e21
2 changed files with 4 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
import { test, describe } from "node:test"; // Runs under vitest (the generators vitest include picks up lib/*.test.mjs);
// node:assert keeps the original assertion style.
import { test, describe } from "vitest";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import fs from "node:fs"; import fs from "node:fs";
import path from "node:path"; import path from "node:path";

View File

@@ -4,7 +4,7 @@ export default defineConfig({
test: { test: {
globals: true, globals: true,
environment: "node", environment: "node",
include: ["*.test.ts", "lib/*.test.ts", "__tests__/*.test.ts"], include: ["*.test.ts", "lib/*.test.{ts,mjs}", "__tests__/*.test.ts"],
clearMocks: true, clearMocks: true,
restoreMocks: true, restoreMocks: true,
// The core-package `*.e2e.test.ts` files each do a full `pnpm install` // The core-package `*.e2e.test.ts` files each do a full `pnpm install`