Skip to content

Commit 9e6377d

Browse files
fix failing test
1 parent 3bf3f38 commit 9e6377d

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/api/providers/__tests__/bedrock-custom-arn.test.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,20 @@ import { ApiHandlerOptions } from "../../../shared/api"
33

44
// Mock the AWS SDK
55
jest.mock("@aws-sdk/client-bedrock-runtime", () => {
6+
const mockResponse = {
7+
output: {
8+
message: {
9+
content: [
10+
{
11+
text: "Test response",
12+
},
13+
],
14+
},
15+
},
16+
}
17+
618
const mockSend = jest.fn().mockImplementation(() => {
7-
return Promise.resolve({
8-
output: new TextEncoder().encode(JSON.stringify({ content: "Test response" })),
9-
})
19+
return Promise.resolve(mockResponse)
1020
})
1121

1222
return {

0 commit comments

Comments
 (0)