-
Notifications
You must be signed in to change notification settings - Fork 93
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(utils): support boolean in types-checks and error-handlers #373
Conversation
@@ -137,6 +147,7 @@ describe("# type-checks", () => { | |||
|
|||
it("Should return false if the value type is not the one expected or is not supported", () => { | |||
expect(isType("string", "number")).toBeFalsy() | |||
expect(isType(1, "boolean")).toBeFalsy() | |||
expect(isType(1, "string")).toBeFalsy() | |||
expect(isType(1, "function")).toBeFalsy() | |||
expect(isType(1, "Array")).toBeFalsy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not vital in this PR, but it would be nice to flesh out the testing of isSupportedType below so it actually checks each of the types. This occurs to me because I was looking for a utest change corresponding to each functional code change, and the change to supporeted types has no corresponding test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @artwyman! Thank you very much for the review. Yes, it makes sense. I just added the remaining types to the Should return true if the type is supported
test.
Does this cover what you needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks!
Congrats, your important contribution to this open-source project has earned you a GitPOAP! GitPOAP: 2025 ZK-KIT Contributor: Head to gitpoap.io & connect your GitHub account to mint! Learn more about GitPOAPs here. |
Description
This PR adds support to check boolean values in the
TypeChecks
andErrorHandlers
modules.Related Issue(s)
Closes #372
Checklist
yarn style
without getting any errorsImportant
We do not accept minor grammatical fixes (e.g., correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical mistake, please feel free to message the team.