Skip to content

Commit 047fbb5

Browse files
陈焕翔陈焕翔
authored andcommitted
test(server): use Effect table-row callback for cleanup negatives
Destructure the single row passed by @effect/vitest instead of treating its TestContext as stderr, and wrap the existing long assertion.
1 parent 6798705 commit 047fbb5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎apps/server/src/storageCleanup.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2069,7 +2069,7 @@ describe("storage cleanup reports and local file policies", () => {
20692069
"non-prefix gitfile diagnostic",
20702070
"warning: command failed\nfatal: gitfile does not point to a valid repository: .git\n",
20712071
],
2072-
] as const)("reports a branch-check %s without removing the worktree", (_name, stderr) =>
2072+
] as const)("reports a branch-check %s without removing the worktree", ([_name, stderr]) =>
20732073
runCleanupTest(
20742074
Effect.gen(function* () {
20752075
const git = yield* GitVcsDriver.GitVcsDriver;
@@ -2099,7 +2099,9 @@ describe("storage cleanup reports and local file policies", () => {
20992099
expect(report.entries[0]?.reason).toContain(stderr.trim().split("\n")[0]);
21002100
expect(report.bytesFreed).toBe(0);
21012101
expect(yield* fixture.fs.exists(fixture.worktree)).toBe(true);
2102-
expect(yield* fixture.fs.readFileString(`${fixture.worktree}/tracked.txt`)).toBe("original\n");
2102+
expect(yield* fixture.fs.readFileString(`${fixture.worktree}/tracked.txt`)).toBe(
2103+
"original\n",
2104+
);
21032105
expect(branchChecks).toBeGreaterThan(0);
21042106
expect(removals).toBe(0);
21052107
expect(fixture.fullStatusCalls()).toBe(0);

0 commit comments

Comments
 (0)