Skip to content

test(core): simplify provider test fixtures - #45743

Merged
kitlangton merged 3 commits into
v2from
provider-test-cleanup
Aug 28, 2026
Merged

test(core): simplify provider test fixtures#45743
kitlangton merged 3 commits into
v2from
provider-test-cleanup

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Why
Provider tests still provisioned services they never consumed and constructed complete catalog records only to copy a few fields into the real draft. Canonical-binding tests also retained nested service reads and renamed imports, obscuring the actual test boundary.

What Changes

  • Removes unused AISDK reads from six provider activation helpers and unused Plugin reads from their behavior cases.
  • Updates Bedrock, Anthropic, Azure, and OpenAI catalog drafts directly with only the fields each scenario supplies.
  • Binds Azure and Cloudflare Workers integration services before use.
  • Uses Bun’s canonical test export in the Snowflake transport cases and the canonical test-host export in Promise adapter cases.
  • Preserves all provider matrices, explicit overrides, environment boundaries, and assertions.

Scope
This owns the still-unowned TESTP-04, TESTP-06, and TESTP-08 occurrences in these eight files. #45635, #45656, #45669, #45689, and #45721 own the other accepted occurrences; only provider-openai.test.ts overlaps #45656 at the file level, with this PR changing catalog setup while #45656 changes activation/integration binding, so there is no dependency. Selector sentinels and Vertex transport injection remain separate follow-ups. Test-only refactoring requires no changeset.

Verification

cd packages/core
bun run test test/plugin/promise.test.ts test/plugin/provider-amazon-bedrock.test.ts test/plugin/provider-anthropic.test.ts test/plugin/provider-azure.test.ts test/plugin/provider-cloudflare-workers-ai.test.ts test/plugin/provider-openai-compatible.test.ts test/plugin/provider-openai.test.ts test/plugin/provider-snowflake-cortex.test.ts
bun typecheck

cd ../..
bun oxlint packages/core/test/plugin/promise.test.ts packages/core/test/plugin/provider-amazon-bedrock.test.ts packages/core/test/plugin/provider-anthropic.test.ts packages/core/test/plugin/provider-azure.test.ts packages/core/test/plugin/provider-cloudflare-workers-ai.test.ts packages/core/test/plugin/provider-openai-compatible.test.ts packages/core/test/plugin/provider-openai.test.ts packages/core/test/plugin/provider-snowflake-cortex.test.ts
bun prettier --check packages/core/test/plugin/promise.test.ts packages/core/test/plugin/provider-amazon-bedrock.test.ts packages/core/test/plugin/provider-anthropic.test.ts packages/core/test/plugin/provider-azure.test.ts packages/core/test/plugin/provider-cloudflare-workers-ai.test.ts packages/core/test/plugin/provider-openai-compatible.test.ts packages/core/test/plugin/provider-openai.test.ts packages/core/test/plugin/provider-snowflake-cortex.test.ts
git diff --check origin/v2...HEAD
git push -u origin provider-test-cleanup

All 88 focused tests passed. Core and push-hook workspace typechecks passed. Formatting and diff checks passed. Scoped lint reported zero errors and only 13 pre-existing fixture assertion/control-flow warnings.

@kitlangton
kitlangton merged commit 2751813 into v2 Aug 28, 2026
8 checks passed
@kitlangton
kitlangton deleted the provider-test-cleanup branch August 28, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant