Skip to content
Source
Sign inSign up
pingdotgg/t3code

test: fix CheckpointReactor rollback assertions for threadId #242

Closeddl-alexandre(GitHub profile, opens in a new tab)wants to merge 1 commit intocodething/648ca884-cursor fromrefs/pull/242/headopened View on GitHub

Showing 1 changed file with 4 additions and 4 deletions.

x
0 of 1 viewed, 1 left
4 additions and 4 deletionsapps/server/src/orchestration/Layers/CheckpointReactor.test.tsModified
View file
@@ -845,7 +845,7 @@
expect(thread.checkpoints[0]?.checkpointTurnCount).toBe(1);
expect(harness.provider.rollbackConversation).toHaveBeenCalledTimes(1);
expect(harness.provider.rollbackConversation).toHaveBeenCalledWith({
-
+ threadId: ThreadId.makeUnsafe("thread-1"),
numTurns: 1,
});
expect(fs.readFileSync(path.join(harness.cwd, "README.md"), "utf8")).toBe("v2\n");
@@ -918,7 +918,7 @@
await waitForEvent(harness.engine, (event) => event.type === "thread.reverted");
expect(harness.provider.rollbackConversation).toHaveBeenCalledTimes(1);
expect(harness.provider.rollbackConversation).toHaveBeenCalledWith({
-
+ threadId: ThreadId.makeUnsafe("thread-1"),
numTurns: 1,
});
});
@@ -1008,11 +1008,11 @@
expect(harness.provider.rollbackConversation).toHaveBeenCalledTimes(2);
expect(harness.provider.rollbackConversation.mock.calls[0]?.[0]).toEqual({
+ threadId: ThreadId.makeUnsafe("thread-1"),
numTurns: 1,
expect(harness.provider.rollbackConversation.mock.calls[1]?.[0]).toEqual({