mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-23 17:52:49 +00:00
test(app): stabilize archive descriptor assertions
The test rebuilt expected provider rows with fresh timestamps, so its result depended on both fixture calls landing in the same millisecond. Assert the preserved descriptor identities instead, matching the behavior under test without clock dependence.
This commit is contained in:
@@ -400,9 +400,11 @@ describe("createArchiveFinishedSubagents", () => {
|
||||
});
|
||||
|
||||
it("dismisses finished provider rows locally without removing their descriptors", async () => {
|
||||
const finishedDescriptor = provider("finished");
|
||||
const runningDescriptor = provider("running", "running");
|
||||
const descriptors = new Map([
|
||||
["finished", provider("finished")],
|
||||
["running", provider("running", "running")],
|
||||
["finished", finishedDescriptor],
|
||||
["running", runningDescriptor],
|
||||
]);
|
||||
const dismissed: string[][] = [];
|
||||
const archive = createArchiveFinishedSubagents([...descriptors.values()], {
|
||||
@@ -420,7 +422,7 @@ describe("createArchiveFinishedSubagents", () => {
|
||||
});
|
||||
|
||||
expect(dismissed).toEqual([["finished"]]);
|
||||
expect(descriptors.get("finished")).toEqual(provider("finished"));
|
||||
expect(descriptors.get("running")).toEqual(provider("running", "running"));
|
||||
expect(descriptors.get("finished")).toBe(finishedDescriptor);
|
||||
expect(descriptors.get("running")).toBe(runningDescriptor);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user