Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .configs/vitest.config.mjs
Original file line numberDiff line numberDiff line change
Expand Up@@ -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,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line numberDiff line numberDiff line change
@@ -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": {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -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 <args>`).
*
* 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
Expand All@@ -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.
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -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";
Expand Down
2 changes: 1 addition & 1 deletion tests/run-vitest.mjs
Original file line numberDiff line numberDiff line change
Expand Up@@ -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,
Expand Down
Loading