-
Notifications
You must be signed in to change notification settings - Fork 0
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 tests for routes #5
base: Day-3-Onboarding
Are you sure you want to change the base?
Conversation
@@ -30,7 +33,7 @@ const paths = [ | |||
{ | |||
path: '/oauth2/scopes', | |||
scopes: [SCOPE_TYPE.SUPER_ADMIN, SCOPE_TYPE.ADMIN], | |||
method: 'POST', | |||
method: 'PATCH', |
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.
Why is this patch ?
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.
You need to create a seperate item for patch
validate: { | ||
payload: Joi.object({ | ||
userId: Joi.string(), | ||
cabId: Joi.string(), | ||
startPoint: Joi.object({ | ||
latitude: Joi.number(), | ||
longitude: Joi.number(), | ||
}), | ||
}), | ||
}, | ||
}, |
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.
Abstract the validation out
For example rideStart validation. If it is a huge object then you are adding too much in the route. So abstracting will help here
Ticket Link
NA
Related Links
NA
Description
Steps to Reproduce / Test
Same as Readme.md
Checklist
yarn test
passesGIF's