diff --git a/src/test/suite/index.ts b/src/test/suite/index.ts index 0d0e68015f..5fe18f1ed0 100644 --- a/src/test/suite/index.ts +++ b/src/test/suite/index.ts @@ -23,8 +23,10 @@ export async function run(): Promise { try { // Find all test files - //const files = await glob("**/**.test.js", { cwd: testsRoot } leaving this commented out for now since we only have three tests - const files = ["suite/modes.test.js", "suite/task.test.js", "suite/extension.test.js"] + const files = await glob("**/**.test.js", { cwd: testsRoot }) + + //If you want to run a specific test, comment out the above line and uncomment the following line and add the test file to the array + //const files = ["suite/modes.test.js"] // Add files to the test suite files.forEach((f: string) => mocha.addFile(path.resolve(testsRoot, f))) diff --git a/src/test/suite/modes.test.ts b/src/test/suite/modes.test.ts index 56eda6e417..3f162499e7 100644 --- a/src/test/suite/modes.test.ts +++ b/src/test/suite/modes.test.ts @@ -89,9 +89,10 @@ suite("Roo Code Modes", () => { console.log(text) } }) - const grade = globalThis.provider.messages.find( + const gradeMessage = globalThis.provider.messages.find( ({ type, text }) => type === "say" && !text?.includes("Grade: (1-10)") && text?.includes("Grade:"), )?.text + const grade = gradeMessage?.match(`Grade: (10|[1-9])`) assert.ok( grade?.includes("Grade: 10") || grade?.includes("Grade: 9") ||