Hi everyone, I just finished the last project and I feel its working pretty well. I’d like get some feedback, specially since I feel this one was quite a bit more complex than the previous ones.
https://fcc-mef-anon-message-board.glitch.me/
-Did quite a bit of checking the DB after the API calls to check the results (not all fields are in the API responses), and to prep some tests too. I tried to keep the db code on their own functions.
-Had to add some delays (similar to old sleeps) for the tests, otherwise updates wouldn’t be done before I could check. There is write concern in MongoDB, but didn’t know making the API slower for the tests was a better approach.
-Also, I’m quite glad I used async/await for this one, made a huge difference on readability and bug fixing. I noticed in some instances an asyc test would pass if I used try/catch around the asserts. Should I not use try/catch blocks in tests to prevent this?
Anyway I’d love to hear your thoughts, thanks a lot in advance.
Martin