-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
[Maintenance] improve testing utils and add delete-user-file test #421
Conversation
c464b60
to
67b9f8c
Compare
src/app-sync.js
Outdated
app.use(express.json()); | ||
|
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.
The /delete-user-file
req.body
was not being parsed as json
by default, which necessitates the middleware to be added.
I manually tested that the /sync
endpoint still works by launching the frontend add doing some syncable stuff, and watching the requests/responses.
It would be nice if there were tests for this function, which is my next plan.
Co-authored-by: Matt Fiddaman <[email protected]>
Took your comments into account. Also, during some more integration testing for Am not knowledgeable enough in javascript testing to know why that might be. |
Follow up PR is here: #423 |
…tualbudget#421) * improve testing utils and add delete-user-file test * remove linting errors * add release notes * match npm scripts naming style Co-authored-by: Matt Fiddaman <[email protected]> * add raw middleware for /sync --------- Co-authored-by: Matt Fiddaman <[email protected]>
Adding integration tests is a pre-requisite to #420, as refactoring might break some stuff without us knowing, and manually doing the actions on the front-end is a pain.
I wanted to create a small PR that shows the value of adding integration tests.
I kept it small on purpose so that I wouldn't have done this for nothing if it gets rejected.
My plan is that this gets accepted, and I/we start adding integration test on all/major endpoints, so that we can more readily refactor the backend to be inline with #420.