Skip to content

Commit eb826b1

Browse files
committed
Change index.ts to always run all tests
Add regex look for grade in in modes.test.ts
1 parent a41fb07 commit eb826b1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/test/suite/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ export async function run(): Promise<void> {
2323

2424
try {
2525
// Find all test files
26-
//const files = await glob("**/**.test.js", { cwd: testsRoot } leaving this commented out for now since we only have three tests
27-
const files = ["suite/modes.test.js", "suite/task.test.js", "suite/extension.test.js"]
26+
const files = await glob("**/**.test.js", { cwd: testsRoot })
27+
28+
//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
29+
//const files = ["suite/modes.test.js"]
2830

2931
// Add files to the test suite
3032
files.forEach((f: string) => mocha.addFile(path.resolve(testsRoot, f)))

src/test/suite/modes.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ suite("Roo Code Modes", () => {
8989
console.log(text)
9090
}
9191
})
92-
const grade = globalThis.provider.messages.find(
92+
const gradeMessage = globalThis.provider.messages.find(
9393
({ type, text }) => type === "say" && !text?.includes("Grade: (1-10)") && text?.includes("Grade:"),
9494
)?.text
95+
const grade = gradeMessage?.match(`Grade: (10|[1-9])`)
9596
assert.ok(
9697
grade?.includes("Grade: 10") ||
9798
grade?.includes("Grade: 9") ||

0 commit comments

Comments
 (0)