Browse Source

task.test.ts fix to check for messages before assersion instead of tokens used

ColemanRoo 11 months ago
parent
commit
a41fb07adc
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/test/suite/task.test.ts

+ 2 - 3
src/test/suite/task.test.ts

@@ -32,10 +32,9 @@ suite("Roo Code Task", () => {
 			startTime = Date.now()
 
 			while (Date.now() - startTime < timeout) {
-				const state = await globalThis.provider.getState()
-				const task = state.taskHistory?.[0]
+				const messages = globalThis.provider.messages
 
-				if (task && task.tokensOut > 0) {
+				if (messages.some(({ type, text }) => type === "say" && text?.includes("My name is Roo"))) {
 					break
 				}