mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
Fix typo for test list
Modify where we log messages to the console for the test
This commit is contained in:
parent
d7b44a2828
commit
21f04f580a
2 changed files with 9 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ 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/tasks.test.js", "suite/extension.test.js"]
|
||||
const files = ["suite/modes.test.js", "suite/task.test.js", "suite/extension.test.js"]
|
||||
|
||||
// Add files to the test suite
|
||||
files.forEach((f: string) => mocha.addFile(path.resolve(testsRoot, f)))
|
||||
|
|
|
|||
|
|
@ -51,6 +51,14 @@ suite("Roo Code Modes", () => {
|
|||
assert.fail("No messages received")
|
||||
}
|
||||
|
||||
//Log the messages to the console
|
||||
globalThis.provider.messages.forEach(({ type, text }) => {
|
||||
if (type === "say") {
|
||||
console.log(text)
|
||||
}
|
||||
})
|
||||
|
||||
//Start Grading Portion of test to grade the response from 1 to 10
|
||||
await globalThis.provider.updateGlobalState("mode", "Ask")
|
||||
let output = globalThis.provider.messages.map(({ type, text }) => (type === "say" ? text : "")).join("\n")
|
||||
await globalThis.api.startNewTask(
|
||||
|
|
@ -84,7 +92,6 @@ suite("Roo Code Modes", () => {
|
|||
const grade = globalThis.provider.messages.find(
|
||||
({ type, text }) => type === "say" && !text?.includes("Grade: (1-10)") && text?.includes("Grade:"),
|
||||
)?.text
|
||||
console.log("THIS IS THE GRADE", grade)
|
||||
assert.ok(
|
||||
grade?.includes("Grade: 10") ||
|
||||
grade?.includes("Grade: 9") ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue