mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix: Update bedrock test mock to match new getModel signature
This commit is contained in:
parent
c133994163
commit
f12ec26b8b
1 changed files with 4 additions and 3 deletions
|
|
@ -317,9 +317,10 @@ describe("AwsBedrockHandler with invokedModelId", () => {
|
|||
}
|
||||
})
|
||||
|
||||
// Mock getModel to throw an error when called with the model name
|
||||
vitest.spyOn(handler, "getModel").mockImplementation((modelName?: string) => {
|
||||
if (modelName === "anthropic.claude-3-sonnet-20240229-v1:0") {
|
||||
// Mock getModel to throw an error when called with context tokens
|
||||
vitest.spyOn(handler, "getModel").mockImplementation((contextTokens?: number) => {
|
||||
// Throw error on second call (when it tries to get the invoked model)
|
||||
if (contextTokens !== undefined) {
|
||||
throw new Error("Test error during model lookup")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue