feat: add project-aware agent workspace
Generic Container CI/CD / test-build-publish (push) Successful in 2m9s
Frontend CI/CD / build-test-publish-and-deploy (push) Successful in 2m39s

This commit is contained in:
2026-10-22 18:52:18 +08:00
parent c6a0e74e72
commit 2d8506fea0
191 changed files with 12373 additions and 3556 deletions
+13
View File
@@ -131,3 +131,16 @@ function createImageMap(loadImage: (path: string) => Promise<{ data: { width: nu
addImage: ReturnType<typeof vi.fn>;
};
}
it("does not access a disposed map after SCADA image loading completes", async () => {
const controller = new AbortController();
let resolve!: (value: { data: { width: number; height: number } }) => void;
const map = createImageMap(() => new Promise((done) => { resolve = done; }));
const pending = registerScadaImages(map, controller.signal);
controller.abort();
resolve({ data: { width: 64, height: 64 } });
await expect(pending).resolves.toMatchObject({ status: "cancelled" });
expect(map.addImage).not.toHaveBeenCalled();
expect(map.loadImage).toHaveBeenCalledTimes(1);
});