Skip to content

Commit 2eb44ab

Browse files
test(server): doctor command assertions hold on any test host
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 8b91ef2 commit 2eb44ab

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎apps/server/src/cli/invocation.test.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,10 @@ it.layer(NodeServices.layer)("host CLI commands", (it) => {
218218
Effect.provideService(HostProcess.IsExecutable, false),
219219
)).command,
220220
).toBe('t3 doctor "--base-dir" "C:\\T3\\\u201C\u201CArchive\u201D\u201D"');
221-
// POSIX hosts keep single quotes for the same input.
222-
expect((yield* hostCommand("linux", { T3CODE_CLI_PATH: shim })).command).toBe(
223-
`${shim} doctor --base-dir 'C:\\Users\\Jane Doe\\.t3'`,
221+
// POSIX hosts keep single quotes for the same input. The shim prefix is
222+
// a host path, so only the arguments are asserted.
223+
expect((yield* hostCommand("linux", { T3CODE_CLI_PATH: shim })).command).toMatch(
224+
/ doctor --base-dir 'C:\\Users\\Jane Doe\\\.t3'$/,
224225
);
225226
}).pipe(Effect.scoped),
226227
);

‎apps/server/src/persistence/DatabaseStorage.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ it.effect("publishes file accounting and the doctor command after each pass", ()
6969
assert.isNotNull(before);
7070
assert.isAbove(before!.databaseBytes, 1048576);
7171
assert.isTrue(before!.incrementalVacuumEnabled);
72-
assert.include(before!.compactCommand, "doctor --base-dir");
72+
// Quoting follows the host shell, so check each word on its own.
73+
assert.include(before!.compactCommand, "doctor");
74+
assert.include(before!.compactCommand, "--base-dir");
7375
assert.include(before!.compactCommand, config.baseDir);
7476

7577
// The next reclaim pass frees the dropped table and republishes.

0 commit comments

Comments
 (0)