11import * as assert from "assert"
22
3- import type { RooCodeAPI , ClineMessage } from "@roo-code/types"
3+ import type { ClineMessage } from "@roo-code/types"
44
55import { sleep , waitFor , waitUntilCompleted } from "./utils"
66
77suite . skip ( "Roo Code Subtasks" , ( ) => {
88 test ( "Should handle subtask cancellation and resumption correctly" , async ( ) => {
9- // @ts -expect-error - Expose the API to the tests.
10- const api = globalThis . api as RooCodeAPI
9+ const api = globalThis . api
1110
1211 const messages : Record < string , ClineMessage [ ] > = { }
1312
@@ -49,7 +48,7 @@ suite.skip("Roo Code Subtasks", () => {
4948 // The parent task should not have resumed yet, so we shouldn't see
5049 // "Parent task resumed".
5150 assert . ok (
52- messages [ parentTaskId ] . find ( ( { type, text } ) => type === "say" && text === "Parent task resumed" ) ===
51+ messages [ parentTaskId ] ? .find ( ( { type, text } ) => type === "say" && text === "Parent task resumed" ) ===
5352 undefined ,
5453 "Parent task should not have resumed after subtask cancellation" ,
5554 )
@@ -63,7 +62,7 @@ suite.skip("Roo Code Subtasks", () => {
6362
6463 // The parent task should still not have resumed.
6564 assert . ok (
66- messages [ parentTaskId ] . find ( ( { type, text } ) => type === "say" && text === "Parent task resumed" ) ===
65+ messages [ parentTaskId ] ? .find ( ( { type, text } ) => type === "say" && text === "Parent task resumed" ) ===
6766 undefined ,
6867 "Parent task should not have resumed after subtask cancellation" ,
6968 )
0 commit comments