port: sync from Mike/pygienium@63c2f73a
This commit is contained in:
@@ -168,4 +168,17 @@ describe("deep-modules check", () => {
|
||||
await rm(empty, { recursive: true, force: true }).catch(() => {});
|
||||
}
|
||||
});
|
||||
|
||||
it("does not skip when sources live in subdirectories (gate scans recursively)", async () => {
|
||||
// Top level holds only a directory — the old shallow gate skipped any
|
||||
// repo whose source lives under `game/`/`src/`-style subdirs.
|
||||
await mkdir(join(cwd, "game"), { recursive: true });
|
||||
await writeFile(join(cwd, "game", "main.lua"), "return {}\n", "utf8");
|
||||
const check = getCheck("deep-modules")!;
|
||||
|
||||
await handleCheckCommand(check, "", stubCtx(cwd));
|
||||
|
||||
const state = await loadRunState(cwd);
|
||||
expect(state?.checks["deep-modules"]?.status).toBe("complete");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -229,4 +229,17 @@ describe("defensive-guards check", () => {
|
||||
const state = await loadRunState(cwd);
|
||||
expect(state?.checks["defensive-guards"]?.status).toBe("skipped");
|
||||
});
|
||||
|
||||
it("does not skip when sources live in subdirectories (gate scans recursively)", async () => {
|
||||
// Top level holds only a directory — the old shallow gate skipped any
|
||||
// repo whose source lives under `game/`/`src/`-style subdirs.
|
||||
await mkdir(join(cwd, "game"), { recursive: true });
|
||||
await writeFile(join(cwd, "game", "main.lua"), "return {}\n", "utf8");
|
||||
const check = getCheck("defensive-guards")!;
|
||||
|
||||
await handleCheckCommand(check, "", stubCtx(cwd));
|
||||
|
||||
const state = await loadRunState(cwd);
|
||||
expect(state?.checks["defensive-guards"]?.status).toBe("complete");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -335,6 +335,19 @@ describe("todos check", () => {
|
||||
expect(state?.checks["todos"]?.status).toBe("skipped");
|
||||
});
|
||||
|
||||
it("does not skip when sources live in subdirectories (gate scans recursively)", async () => {
|
||||
// Top level holds only a directory — the old shallow gate skipped any
|
||||
// repo whose source lives under `game/`/`src/`-style subdirs.
|
||||
await mkdir(join(cwd, "game"), { recursive: true });
|
||||
await writeFile(join(cwd, "game", "main.lua"), "return {}\n", "utf8");
|
||||
const check = getCheck("todos")!;
|
||||
|
||||
await handleCheckCommand(check, "", stubCtx(cwd));
|
||||
|
||||
const state = await loadRunState(cwd);
|
||||
expect(state?.checks["todos"]?.status).toBe("complete");
|
||||
});
|
||||
|
||||
it("reports a new/resolved delta against the previous run's counts", async () => {
|
||||
await seedStubs(cwd);
|
||||
const check = getCheck("todos")!;
|
||||
|
||||
Reference in New Issue
Block a user