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 GetEstimationDto to zod #1331

Merged
merged 3 commits into from
Mar 21, 2024
Merged

Migrate GetEstimationDto to zod #1331

merged 3 commits into from
Mar 21, 2024

Conversation

iamacook
Copy link
Member

Summary

This migrates the validation of GetEstimationDto to zod.

Changes

  • Remove GetEstimationDtoValidationPipe and associated schemas.
  • Add test-covered GetEstimationDtoSchema and infer types from it.
  • Propagate type requirements.
  • Update tests accordingly.

@iamacook iamacook self-assigned this Mar 19, 2024
@coveralls
Copy link

coveralls commented Mar 19, 2024

Pull Request Test Coverage Report for Build 8376366489

Details

  • 15 of 16 (93.75%) changed or added relevant lines in 5 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 93.255%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/domain/estimations/entities/get-estimation.dto.entity.ts 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/domain/estimations/entities/get-estimation.dto.entity.ts 4 0.0%
Totals Coverage Status
Change from base Build 8347022186: -0.03%
Covered Lines: 6471
Relevant Lines: 6692

💛 - Coveralls

@iamacook iamacook marked this pull request as ready for review March 20, 2024 08:22
@iamacook iamacook requested a review from a team as a code owner March 20, 2024 08:22
);
});

it.each([['to' as const], ['value' as const], ['operation' as const]])(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to have an array of tuples here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed in ee7521f.

@iamacook iamacook requested a review from fmrsabino March 21, 2024 14:10
@iamacook iamacook merged commit 570c7db into main Mar 21, 2024
16 checks passed
@iamacook iamacook deleted the get-estimation-dto-zod branch March 21, 2024 14:27
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