test: stabilize worktree isolation checks
This commit is contained in:
parent
0203b3aab1
commit
d5a865b230
|
|
@ -65,7 +65,7 @@ describe("worktree isolation", () => {
|
||||||
manager.remove(spec.name);
|
manager.remove(spec.name);
|
||||||
expect(fs.existsSync(wt)).toBe(false);
|
expect(fs.existsSync(wt)).toBe(false);
|
||||||
expect(manager.list().map((item) => item.name)).not.toContain(spec.name);
|
expect(manager.list().map((item) => item.name)).not.toContain(spec.name);
|
||||||
});
|
}, 30_000);
|
||||||
|
|
||||||
it("creates and checks out a branch in a single step", () => {
|
it("creates and checks out a branch in a single step", () => {
|
||||||
const { root: repo, worktrees } = mkRepo();
|
const { root: repo, worktrees } = mkRepo();
|
||||||
|
|
@ -82,7 +82,7 @@ describe("worktree isolation", () => {
|
||||||
|
|
||||||
manager.remove(spec.name);
|
manager.remove(spec.name);
|
||||||
expect(fs.existsSync(expected)).toBe(false);
|
expect(fs.existsSync(expected)).toBe(false);
|
||||||
});
|
}, 30_000);
|
||||||
|
|
||||||
it("parses worktree list safely", () => {
|
it("parses worktree list safely", () => {
|
||||||
const { root: repo, worktrees } = mkRepo();
|
const { root: repo, worktrees } = mkRepo();
|
||||||
|
|
@ -100,5 +100,5 @@ describe("worktree isolation", () => {
|
||||||
expect(manager.list().map((item) => item.path.replace(/\\/g, "/"))).toContain(normalizedWt);
|
expect(manager.list().map((item) => item.path.replace(/\\/g, "/"))).toContain(normalizedWt);
|
||||||
|
|
||||||
manager.remove(spec.name);
|
manager.remove(spec.name);
|
||||||
});
|
}, 30_000);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue