test(lanes): clean up fake-gh bin tmpdirs after ci/status tests

This commit is contained in:
2026-08-25 09:59:29 +07:00
parent 90a07debb5
commit 928512b749
2 changed files with 9 additions and 3 deletions
+6 -2
View File
@@ -545,9 +545,10 @@ describe("ccam lanes — inferred stage detection", () => {
describe("ccam lanes ci status", () => {
let restorePath;
let bin;
before(() => {
const bin = fs.mkdtempSync(path.join(os.tmpdir(), "ccam-ci-status-cli-bin-"));
bin = fs.mkdtempSync(path.join(os.tmpdir(), "ccam-ci-status-cli-bin-"));
fs.writeFileSync(
path.join(bin, "gh"),
`#!/usr/bin/env bash
@@ -580,7 +581,10 @@ exit 1
};
});
after(() => restorePath && restorePath());
after(() => {
if (restorePath) restorePath();
fs.rmSync(bin, { recursive: true, force: true });
});
it("exits 0 and prints success state", async () => {
const r = await cli(["lanes", "ci", "status", "development"], LANE_DIR);