fix(e2e): fix TypeScript error in read-file.test.ts

- Fix type mismatch where toolResult could be undefined but was typed as string | null
- Add proper null fallback for resultMatch[1]
This commit is contained in:
Roo Code 2025-10-18 23:18:15 +00:00
parent 2171183ff9
commit cf01615b73

View file

@ -178,7 +178,7 @@ suite("Roo Code read_file Tool", function () {
resultMatch = requestData.request.match(/Result:\s*\n([\s\S]+?)(?:\n\n|$)/)
}
if (resultMatch) {
toolResult = resultMatch[1]
toolResult = resultMatch[1] || null
console.log("Extracted tool result:", toolResult)
} else {
console.log("Could not extract tool result from request")