Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate PreviewTransactionDto to zod #1290

Merged
merged 8 commits into from
Mar 15, 2024

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Mar 12, 2024

Summary

This migrates the validation of PreviewTransactionDto to zod.

Changes

  • Remove PreviewTransactionDtoValidationPipe
  • Add and use PreviewTransactionDtoSchema schema
  • Infer PreviewTransactionDto from schema
  • Update tests accordingly

@iamacook iamacook self-assigned this Mar 12, 2024
Comment on lines +40 to +50
imports: [AppModule.register(configuration)],
})
.overrideModule(AccountDataSourceModule)
.useModule(TestAccountDataSourceModule)
.overrideModule(CacheModule)
.useModule(TestCacheModule)
.overrideModule(RequestScopedLoggingModule)
.useModule(TestLoggingModule)
.overrideModule(NetworkModule)
.useModule(TestNetworkModule)
.compile();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was required in order to test validation.

@iamacook iamacook marked this pull request as ready for review March 12, 2024 17:01
@iamacook iamacook requested a review from a team as a code owner March 12, 2024 17:01
@coveralls
Copy link

coveralls commented Mar 12, 2024

Pull Request Test Coverage Report for Build 8297422068

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 4 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.05%) to 93.577%

Files with Coverage Reduction New Missed Lines %
src/routes/transactions/entities/tests/human-description.builder.ts 1 90.0%
src/routes/transactions/mappers/common/transaction-info.mapper.ts 1 78.98%
Totals Coverage Status
Change from base Build 8284276295: -0.05%
Covered Lines: 6471
Relevant Lines: 6680

💛 - Coveralls

@iamacook iamacook marked this pull request as draft March 13, 2024 11:50
Base automatically changed from zod-get-data-decoded-dto-validation to main March 14, 2024 13:30
@iamacook iamacook marked this pull request as ready for review March 14, 2024 16:45
@iamacook iamacook merged commit d3f662c into main Mar 15, 2024
16 checks passed
@iamacook iamacook deleted the zod-preview-transaction-dto-validation branch March 15, 2024 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants