fix: close workspace terminals before deletion

This commit is contained in:
Federico Jaramillo Martinez
2026-06-04 21:31:39 +02:00
parent 30fb9602d6
commit 9c3dafc4d4
17 changed files with 415 additions and 38 deletions
@@ -2,6 +2,20 @@ import { describe, expect, it } from "vitest";
import { TerminalService } from "./terminalService";
describe("TerminalService command runs", () => {
it("closes all terminal records for a cwd", () => {
const service = new TerminalService();
try {
const terminal = service.create({ cwd: process.cwd() });
service.closeForCwd(process.cwd());
expect(service.get(terminal.id)).toBeUndefined();
expect(service.list(process.cwd())).toEqual([]);
} finally {
service.dispose();
}
});
it("tracks dedicated terminal command runs through completion", async () => {
const service = new TerminalService();
try {