Skip to content

Commit c1910b7

Browse files
committed
test(repair): give the repair fixture the manifest a real project has
#230 merged while this was in flight, and its integration fixture writes a current-layout tree with no `taskless.json`. A tree without a manifest reads as version 0, so `check` refuses it, and every repair notice the test asserts on went missing. The refusal is right and stays. Nothing can tell a current tree with no manifest from a pre-`0004` project by looking, and the safe answer to "I cannot confirm this is current" is to say so rather than to read it and report whatever falls out — which in that fixture's case was an empty envelope. So the fixture completes its scaffold, the way every other suite here now does.
1 parent 6991295 commit c1910b7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎packages/cli/test/repair-integration.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { promisify } from "node:util";
88
import { afterEach, beforeEach, describe, expect, it } from "vitest";
99

1010
import { canonicalHash } from "../src/rules/rule-hash";
11+
import { migrateFixture } from "./support/current-project";
1112

1213
const execFileAsync = promisify(execFile);
1314
const binPath = resolve(import.meta.dirname, "../dist/index.js");
@@ -80,6 +81,12 @@ async function runCli(
8081
args: string[],
8182
env: Record<string, string>
8283
): Promise<{ stdout: string; exitCode: number }> {
84+
// The fixture writes a current-layout tree but no manifest, and `check`
85+
// refuses a project it cannot confirm is current — a tree without a
86+
// manifest reads as version 0, and it cannot tell this one from a
87+
// pre-`0004` project by looking. So the scaffold is completed here, which
88+
// is what a real project has.
89+
await migrateFixture(args);
8390
try {
8491
const { stdout } = await execFileAsync("node", [binPath, ...args], {
8592
env: { ...process.env, ...env },

0 commit comments

Comments
 (0)