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

This commit is contained in:
ColemanRoo 2025-02-11 14:34:03 -06:00
parent 63346fbc6e
commit a41fb07adc

View file

@ -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
}