Skip to content

Commit 95dfbad

Browse files
committed
fix: update tests to match new function signatures after merge
1 parent 65823f0 commit 95dfbad

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

src/api/providers/bedrock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
224224

225225
if (this.options.awsUseApiKey && this.options.awsApiKey) {
226226
// Use API key/token-based authentication if enabled and API key is set
227-
;(clientConfig as any).token = { token: this.options.awsApiKey }
228-
;(clientConfig as any).authSchemePreference = ["httpBearerAuth"] // Otherwise there's no end of credential problems.
227+
clientConfig.token = { token: this.options.awsApiKey }
228+
clientConfig.authSchemePreference = ["httpBearerAuth"] // Otherwise there's no end of credential problems.
229229
} else if (this.options.awsUseProfile && this.options.awsProfile) {
230230
// Use profile-based credentials if enabled and profile is set
231231
clientConfig.credentials = fromIni({

src/core/mentions/__tests__/processUserContentMentions.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ describe("processUserContentMentions", () => {
5252
mockFileContextTracker,
5353
mockRooIgnoreController,
5454
true,
55+
true, // includeDiagnosticMessages
56+
50, // maxDiagnosticMessages
5557
100,
5658
)
5759
})
@@ -79,6 +81,8 @@ describe("processUserContentMentions", () => {
7981
mockFileContextTracker,
8082
mockRooIgnoreController,
8183
true,
84+
true, // includeDiagnosticMessages
85+
50, // maxDiagnosticMessages
8286
undefined,
8387
)
8488
})
@@ -107,6 +111,8 @@ describe("processUserContentMentions", () => {
107111
mockFileContextTracker,
108112
mockRooIgnoreController,
109113
true,
114+
true, // includeDiagnosticMessages
115+
50, // maxDiagnosticMessages
110116
-1,
111117
)
112118
})
@@ -309,6 +315,8 @@ describe("processUserContentMentions", () => {
309315
mockFileContextTracker,
310316
undefined,
311317
true, // showRooIgnoredFiles should default to true
318+
true, // includeDiagnosticMessages
319+
50, // maxDiagnosticMessages
312320
undefined,
313321
)
314322
})
@@ -336,6 +344,8 @@ describe("processUserContentMentions", () => {
336344
mockFileContextTracker,
337345
undefined,
338346
false,
347+
true, // includeDiagnosticMessages
348+
50, // maxDiagnosticMessages
339349
undefined,
340350
)
341351
})

src/integrations/misc/__tests__/extract-text-large-files.spec.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,15 @@ describe("extractTextFromFile - Large File Handling", () => {
152152
expect(result).toContain("[File truncated: showing 500 of 10000 total lines")
153153
})
154154

155-
it("should handle maxReadFileLine of 0 by not truncating", async () => {
155+
it("should handle maxReadFileLine of 0 by throwing an error", async () => {
156156
const fileContent = "Line 1\nLine 2\nLine 3"
157157

158158
mockedFs.readFile.mockResolvedValue(fileContent as any)
159159

160-
const result = await extractTextFromFile("/test/file.ts", 0)
161-
162-
// maxReadFileLine of 0 or negative means no limit
163-
expect(result).toContain("1 | Line 1")
164-
expect(result).toContain("2 | Line 2")
165-
expect(result).toContain("3 | Line 3")
166-
expect(result).not.toContain("[File truncated:")
160+
// maxReadFileLine of 0 should throw an error
161+
await expect(extractTextFromFile("/test/file.ts", 0)).rejects.toThrow(
162+
"Invalid maxReadFileLine: 0. Must be a positive integer or -1 for unlimited.",
163+
)
167164
})
168165

169166
it("should handle negative maxReadFileLine by treating as undefined", async () => {

0 commit comments

Comments
 (0)