From 5816ca8ae38bd95f39ec2f0fe0eac2f5b2552ee2 Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 24 Feb 2026 20:41:15 +0800 Subject: [PATCH] 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. --- tests/config/claudeProviderPresets.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/config/claudeProviderPresets.test.ts b/tests/config/claudeProviderPresets.test.ts index d20ce46e2..dc1f4397c 100644 --- a/tests/config/claudeProviderPresets.test.ts +++ b/tests/config/claudeProviderPresets.test.ts @@ -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",