Closed OultimoCoder closed 2 months ago
[!CAUTION]
Review failed
The pull request is closed.
The changes involve updates to the project's testing and mocking strategies for AWS SDK interactions. Several dependencies have been removed and added in package.json
, while integration tests have been restructured to utilize new AWS SDK commands. New utility files have been introduced to facilitate AWS client mocking and improve test assertions, enhancing type safety and modularity in the test suite.
File(s) | Change Summary |
---|---|
package.json |
Removed "aws-sdk-client-mock" and "aws-sdk-client-mock-vitest" ; added "@smithy/types" . |
tests/integration/auth/auth.test.ts |
Updated to use SESClient and SendEmailCommand ; changed sesMock declaration from variable to constant; included extended matchers. |
tests/mocks/awsClientStub/awsClientStub.ts |
Introduced a framework for mocking AWS client behavior, including AwsStub class and utility types for improved type safety. |
tests/mocks/awsClientStub/expectMock.ts |
Added custom matchers for testing AWS command invocations; extended the vitest module with new assertions. |
tests/mocks/awsClientStub/index.ts |
Created a re-export module consolidating exports from mockClient , awsClientStub , and expectMock . |
tests/mocks/awsClientStub/mockClient.ts |
Provided a utility for mocking the send() method of AWS clients, enhancing test configurations and behavior. |
In the meadow of code, changes sprout,
With stubs and mocks, there’s no doubt.
AWS calls, now easier to see,
A rabbit’s delight, in tests so free!
Hop, skip, and jump, let’s celebrate,
For clearer paths, we elevate! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Chores