-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 test for hash with empty string #4814
Conversation
✨ Coder.com for PR #4814 deployed! It will be updated on every commit.
|
Codecov Report
@@ Coverage Diff @@
## main #4814 +/- ##
=======================================
Coverage ? 69.25%
=======================================
Files ? 29
Lines ? 1649
Branches ? 363
=======================================
Hits ? 1142
Misses ? 430
Partials ? 77
Continue to review full report at Codecov.
|
f110bb6
to
cd488fb
Compare
try { | ||
return await argon2.hash(password) | ||
} catch (error: any) { | ||
logger.error(error) | ||
return "" | ||
} |
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.
✍🏼 as discussed with @code-asher, this will only throw if you throw in something other than string
(like number
). Since TS will prevent that, we don't need the try/catch
block.
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.
🎉
This PR adds an additional test for the
hash
function.Fixes N/A
#TestingMondays