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

feat: add NativeEnum validator #54

Merged
merged 6 commits into from
Mar 5, 2022
Merged

feat: add NativeEnum validator #54

merged 6 commits into from
Mar 5, 2022

Conversation

vladfrangu
Copy link
Member

Closes #48

@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2022

Codecov Report

Merging #54 (468937b) into main (793648b) will increase coverage by 0.11%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #54      +/-   ##
==========================================
+ Coverage   97.49%   97.61%   +0.11%     
==========================================
  Files          41       43       +2     
  Lines        1079     1133      +54     
  Branches      222      230       +8     
==========================================
+ Hits         1052     1106      +54     
  Misses         23       23              
  Partials        4        4              
Impacted Files Coverage Δ
src/index.ts 100.00% <100.00%> (ø)
src/lib/Shapes.ts 100.00% <100.00%> (ø)
src/lib/errors/UnknownEnumValueError.ts 100.00% <100.00%> (ø)
src/validators/BaseValidator.ts 100.00% <100.00%> (ø)
src/validators/DefaultValidator.ts 77.77% <100.00%> (ø)
src/validators/NativeEnumValidator.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 793648b...468937b. Read the comment docs.

favna
favna previously approved these changes Mar 3, 2022
tests/validators/nativeEnum.test.ts Show resolved Hide resolved
src/validators/NativeEnumValidator.ts Outdated Show resolved Hide resolved
src/validators/NativeEnumValidator.ts Outdated Show resolved Hide resolved
src/validators/BaseValidator.ts Outdated Show resolved Hide resolved
src/validators/NativeEnumValidator.ts Show resolved Hide resolved
src/validators/NativeEnumValidator.ts Show resolved Hide resolved
@vladfrangu vladfrangu requested a review from kyranet March 3, 2022 11:44
@favna favna merged commit 7359042 into main Mar 5, 2022
@favna favna deleted the feat/native-enum branch March 5, 2022 11:38
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.

request: Implement something like zod's nativeEnum
5 participants