Skip to content

Commit 0418a45

Browse files
committed
fix: clean up bedrock test lint and dead code
Remove unused config parameter and dead _lastConfig assignment from mock factory. Break long mockReturnValue chain to satisfy biome line-length rule. Signed-off-by: majiayu000 <1835304752@qq.com>
1 parent bd1aab6 commit 0418a45

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

apps/sim/providers/bedrock/index.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'
66
const mockSend = vi.fn()
77

88
vi.mock('@aws-sdk/client-bedrock-runtime', () => ({
9-
BedrockRuntimeClient: vi.fn().mockImplementation((config: any) => {
10-
mockSend._lastConfig = config
9+
BedrockRuntimeClient: vi.fn().mockImplementation(() => {
1110
return { send: mockSend }
1211
}),
1312
ConverseCommand: vi.fn(),
1413
ConverseStreamCommand: vi.fn(),
1514
}))
1615

1716
vi.mock('@/providers/bedrock/utils', () => ({
18-
getBedrockInferenceProfileId: vi.fn().mockReturnValue('us.anthropic.claude-3-5-sonnet-20241022-v2:0'),
17+
getBedrockInferenceProfileId: vi
18+
.fn()
19+
.mockReturnValue('us.anthropic.claude-3-5-sonnet-20241022-v2:0'),
1920
checkForForcedToolUsage: vi.fn(),
2021
createReadableStreamFromBedrockStream: vi.fn(),
2122
generateToolUseId: vi.fn().mockReturnValue('tool-1'),

0 commit comments

Comments
 (0)