From c28f2c139056b4391dafc4dae22507f461aaed6e Mon Sep 17 00:00:00 2001 From: Shinrai Date: Sun, 2 Aug 2026 23:21:59 -0700 Subject: [PATCH 1/2] chore: rename test files to *.test.vitest.mjs convention Renames tests/gitmulti.test.mjs and tests/gitmulti.cli.test.mjs to the fleet-wide *.test.vitest.mjs naming, and updates the vitest config include glob + run-vitest.mjs's testFilePattern (and doc-comment cross-references) to match. --- .configs/vitest.config.mjs | 2 +- .../{gitmulti.cli.test.mjs => gitmulti.cli.test.vitest.mjs} | 6 +++--- tests/{gitmulti.test.mjs => gitmulti.test.vitest.mjs} | 2 +- tests/run-vitest.mjs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename tests/{gitmulti.cli.test.mjs => gitmulti.cli.test.vitest.mjs} (92%) rename tests/{gitmulti.test.mjs => gitmulti.test.vitest.mjs} (99%) diff --git a/.configs/vitest.config.mjs b/.configs/vitest.config.mjs index b485fa3..483c5d7 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/gitmulti.cli.test.mjs b/tests/gitmulti.cli.test.vitest.mjs similarity index 92% rename from tests/gitmulti.cli.test.mjs rename to tests/gitmulti.cli.test.vitest.mjs index 001c0d0..61e65b4 100644 --- a/tests/gitmulti.cli.test.mjs +++ b/tests/gitmulti.cli.test.vitest.mjs @@ -2,11 +2,11 @@ * End-to-end characterization of the gitmulti CLI entry point via a real, * fully isolated subprocess (spawnSync of `node gitmulti.js `). * - * This complements gitmulti.test.mjs, which drives gitmulti.js in-process for + * This complements gitmulti.test.vitest.mjs, which drives gitmulti.js in-process for * statement/branch coverage. Two scenarios cannot be driven that way without * either mocking `child_process` (which does not work here — commander's * internal `require("child_process")` is not reachable by `vi.mock`, see the - * comment at the top of gitmulti.test.mjs) or letting a real spawn attempt + * comment at the top of gitmulti.test.vitest.mjs) or letting a real spawn attempt * happen inside the test worker process (which leaks an async `process.exit` * call that fires after the test body returns and trips Vitest's * unexpected-exit detector). Running the real CLI as a genuine child process @@ -15,7 +15,7 @@ * * This does not shell out to `git` and never touches a real repository or * the filesystem beyond the ENOENT spawn attempt below — gitmulti.js has no - * git/`.gitmulti` handling of its own yet (see gitmulti.test.mjs's file + * git/`.gitmulti` handling of its own yet (see gitmulti.test.vitest.mjs's file * banner); the "list" subcommand it declares as its default is meant to be * an executable sibling file (`gitmulti-list`) that does not exist in this * package, so invoking it is expected, currently, to fail. diff --git a/tests/gitmulti.test.mjs b/tests/gitmulti.test.vitest.mjs similarity index 99% rename from tests/gitmulti.test.mjs rename to tests/gitmulti.test.vitest.mjs index 41400b3..ca09a8d 100644 --- a/tests/gitmulti.test.mjs +++ b/tests/gitmulti.test.vitest.mjs @@ -35,7 +35,7 @@ * in-process — no matching flag/command, which falls through to commander's * `defaultExecutable` ("list") and really attempts to spawn a `gitmulti-list` * executable that does not exist in this package — is characterized instead - * via a real, fully isolated subprocess in gitmulti.cli.test.mjs, so a failed + * via a real, fully isolated subprocess in gitmulti.cli.test.vitest.mjs, so a failed * spawn attempt never touches this test's own process. */ import { describe, it, expect, vi, beforeEach, afterEach } from "vitest"; 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, From 6c23981da8d7db069165ebebc9e0ee97ee7177a2 Mon Sep 17 00:00:00 2001 From: "cldmv-bot[bot]" <230771808+cldmv-bot[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 06:41:52 +0000 Subject: [PATCH 2/2] chore: bump version to 0.0.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 07e64f0..366cb1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gitmulti", - "version": "0.0.2", + "version": "0.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "gitmulti", - "version": "0.0.2", + "version": "0.0.3", "license": "GPL-3.0", "dependencies": { "commander": "^2.19.0" diff --git a/package.json b/package.json index e6f1f34..1bd1447 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gitmulti", - "version": "0.0.2", + "version": "0.0.3", "description": "Simple Node system to manage multiple Repositories into the same repo", "main": "gitmulti.js", "scripts": {