mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-09 22:31:08 +00:00
Change index.ts to always run all tests
Add regex look for grade in in modes.test.ts
This commit is contained in:
parent
a41fb07adc
commit
eb826b1c90
2 changed files with 6 additions and 3 deletions
|
|
@ -23,8 +23,10 @@ export async function run(): Promise<void> {
|
|||
|
||||
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)))
|
||||
|
|
|
|||
|
|
@ -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") ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue