-
Notifications
You must be signed in to change notification settings - Fork 6
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
#159403248 Increase coverage by 75% #14
Conversation
- add tests for user profile modifications - modify a utility function - modify validate.js [Delivers #159403248]
Pull Request Test Coverage Report for Build 212
💛 - Coveralls |
@@ -45,7 +45,7 @@ export default class ValidateUser { | |||
static validatePassword(str) { | |||
const passwordFormat = /((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+[0-9a-z]+$/i; | |||
if (!str || str.trim().length < 1) { | |||
return { error: 'Password cannnot be empty' }; | |||
return { error: 'Password cannot be empty' }; |
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.
Implement returning 'error' as stated in the readme.
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.
I believe this is a function I wrote. This return is from a helper method in this class and not from the json response. The Json response using this method returns errors in the right format.
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.
Follow the method on the Readme when returning a response error.
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.
I understand that the return format is from a helper method in this class and not from the json response.
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.
LGTM
What does this PR do?
Increase coverage by 75%
Description of Task to be completed?
How should this be manually tested?
cd
into the directorycp .env.sample .env
npm install
npm run migrate
npm test
Any background context you want to provide?
N/A
What are the relevant pivotal tracker stories?
#159403248
Screenshots (if appropriate)
N/A