Skip to content

Commit dd1e543

Browse files
test: assert the full abort message of the aborted task
1 parent d5212d8 commit dd1e543

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/core/task/__tests__/Task.persistence.spec.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,7 +3039,9 @@ describe("Task persistence", () => {
30393039
it("really cannot say the closing note: the real say of an aborted task throws", async () => {
30403040
const task = abortedTaskWithCheckpoint()
30413041

3042-
await expect(task.say("api_req_deleted", "{}")).rejects.toThrow(/aborted/)
3042+
await expect(task.say("api_req_deleted", "{}")).rejects.toThrow(
3043+
`[RooCode#say] task ${task.taskId}.${task.instanceId} aborted`,
3044+
)
30433045
})
30443046

30453047
it("rewinds, stores both histories and starts the task again, though the note cannot be said", async () => {
@@ -3056,7 +3058,9 @@ describe("Task persistence", () => {
30563058

30573059
// The note was tried, and the abort refused it.
30583060
expect(say).toHaveBeenCalledWith("api_req_deleted", expect.any(String))
3059-
await expect(say.mock.results[0].value).rejects.toThrow(/aborted/)
3061+
await expect(say.mock.results[0].value).rejects.toThrow(
3062+
`[RooCode#say] task ${task.taskId}.${task.instanceId} aborted`,
3063+
)
30603064
// Both histories were cut and stored, as the rewind left them.
30613065
expect(task.clineMessages.map((m) => m.ts)).toEqual([1, 2])
30623066
expect(task.apiConversationHistory.map((m) => m.ts)).toEqual([1, 2])

0 commit comments

Comments
 (0)