Skip to content

chore(tests): replace aws-sdk-client-mock-vitest with local matcher - #5693

Merged
dreamorosi merged 4 commits into
mainfrom
chore/5692-local-aws-sdk-matcher
Sep 11, 2026
Merged

chore(tests): replace aws-sdk-client-mock-vitest with local matcher#5693
dreamorosi merged 4 commits into
mainfrom
chore/5692-local-aws-sdk-matcher

Conversation

@svozza

@svozza svozza commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace aws-sdk-client-mock-vitest with a local toReceiveCommandWith matcher, removing the dependency compatibility blocker identified in #5655. The Vitest upgrade and its separate Assertion typing fix remain in that PR.

Changes

  • Implement and register toReceiveCommandWith alongside the existing custom matchers in setupEnv.ts, preserving typed assertions, partial matching, asymmetric matcher support, negation, and failure diagnostics.
  • Remove the dependency and unused snippet import, and update the documentation recommendation. Existing test assertions remain unchanged.
  • Add unit and type tests. All 12 matcher tests pass, with every statement, function, and branch in the new matcher covered. Workspace type checks and the full pre-push suite of 3,718 tests pass with 100% coverage for the configured source files.

Issue number: closes #5692


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Implement toReceiveCommandWith locally with typed inputs, partial matching, and failure diagnostics. Remove the dependency and update documentation and test configuration.

Closes #5692
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation Bot added the size/L PRs between 100-499 LOC label Sep 10, 2026
@svozza svozza changed the title chore(testing): replace aws-sdk-client-mock-vitest with local matcher chore(tests): replace aws-sdk-client-mock-vitest with local matcher Sep 10, 2026
@dreamorosi
dreamorosi merged commit e52f518 into main Sep 11, 2026
41 checks passed
@dreamorosi
dreamorosi deleted the chore/5692-local-aws-sdk-matcher branch September 11, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L PRs between 100-499 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maintenance: Replace aws-sdk-client-mock-vitest with an internal matcher

2 participants