refactor(provider/amazon-bedrock): finish fixture migration for doGenerate tests#12503
Merged
refactor(provider/amazon-bedrock): finish fixture migration for doGenerate tests#12503
Conversation
remove 'should extract text response' and 'should extract usage' tests
from the inline section since identical fixture-based versions already
exist in the describe('text') block
…th fixture
switch tests that only check request body/headers to use
prepareJsonFixtureResponse('bedrock-text') instead of inline helper
…irect server.urls convert remaining tests that need specific response content to use direct server.urls[generateUrl].response assignment instead of the inline prepareJsonResponse helper
delete the inline prepareJsonResponse function and unused BedrockReasoningContentBlock/BedrockRedactedReasoningContentBlock imports
gr2m
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
background
amazon-bedrock was partially migrated to the fixture-based test pattern - doStream and some doGenerate tests already used
prepareJsonFixtureResponse/prepareChunksFixtureResponse, but the doGenerate section still had an inlineprepareJsonResponsehelper used by ~29 testssummary
should extract text responseandshould extract usage) that were identical to existing fixture-based tests in thedescribe('text')blockprepareJsonResponse({})calls withprepareJsonFixtureResponse('bedrock-text')for tests that only check request body/headersprepareJsonResponse({...specific fields...})calls with directserver.urls[generateUrl].responseassignment for tests that need specific response contentprepareJsonResponsehelper function and unusedBedrockReasoningContentBlock/BedrockRedactedReasoningContentBlockimportsno new fixtures were needed - all existing fixtures were already recorded from real API calls
verification
grep -c prepareJsonResponsereturns 0checklist
pnpm changesetin root)