mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
fix(test): align Bedrock API Key test assertions with preset implementation
The API Key preset was refactored to use standard UI input (apiKey: "") instead of template variables, but the tests were not updated accordingly.
This commit is contained in:
@@ -51,9 +51,9 @@ describe("AWS Bedrock Provider Presets", () => {
|
||||
expect(bedrockApiKey).toBeDefined();
|
||||
});
|
||||
|
||||
it("API Key preset should have apiKey template and AWS env variables", () => {
|
||||
it("API Key preset should have apiKey field and AWS env variables", () => {
|
||||
const config = bedrockApiKey!.settingsConfig as any;
|
||||
expect(config).toHaveProperty("apiKey", "${BEDROCK_API_KEY}");
|
||||
expect(config).toHaveProperty("apiKey", "");
|
||||
expect(config.env).toHaveProperty("AWS_REGION");
|
||||
expect(config.env).toHaveProperty("CLAUDE_CODE_USE_BEDROCK", "1");
|
||||
});
|
||||
@@ -64,9 +64,8 @@ describe("AWS Bedrock Provider Presets", () => {
|
||||
expect(env).not.toHaveProperty("AWS_SECRET_ACCESS_KEY");
|
||||
});
|
||||
|
||||
it("API Key preset should have template values for API key and region", () => {
|
||||
it("API Key preset should have template values for region only", () => {
|
||||
expect(bedrockApiKey!.templateValues).toBeDefined();
|
||||
expect(bedrockApiKey!.templateValues!.BEDROCK_API_KEY).toBeDefined();
|
||||
expect(bedrockApiKey!.templateValues!.AWS_REGION).toBeDefined();
|
||||
expect(bedrockApiKey!.templateValues!.AWS_REGION.editorValue).toBe(
|
||||
"us-west-2",
|
||||
|
||||
Reference in New Issue
Block a user