-
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
#24-CRUD-upsert-driver #34
Conversation
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.
nicely done, a nit pick and why ur test isnt failing are the only comments i have
* CRUD operation to create a driver in the database if it doesn't already exist, does nothing otherwise. | ||
* | ||
*/ | ||
export const upsertDriver = async (driver_name: string) => { |
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.
we dont user _ really, should be camel case
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 see i see changing it rn.
*/ | ||
test('Get All Data Types Works', async () => { | ||
const expected = [{ username: 'test' }]; | ||
const result = await getAllDrivers(); |
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 isnt going to pass because it doesnt exist in the database yet
I think this should fix the test issue
Fixed it so that it camel cases
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.
Nicely Done
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.
oh whoops my workflows caught an error lmaooooooo
Im trolling.
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.
yay
Changes
I added the service function for upsertDriver and in order to test this we needed to call a getAllDrivers type of service function so I made that as well. I also added testing for both of the service functions I added and lastly I added the getAllDrivers to the message map.
Notes
The tests were running fine in the terminal I'm gonna try to figure out why its not working here.
To Do
Any remaining things that need to get done
Checklist
It can be helpful to check the
Checks
andFiles changed
tabs.Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.
package-lock.json
changes (unless dependencies have changed)Closes #24