Exercise tracker project - Tests not passing and I don't know why

Tell us what’s happening:
my project keeps flunking tests 10-16 of the test, and I don’t know why, I’ve checked to see if I misspelt something and to the best of my knowledge everything looks exactly as is should, as far as a can see, everything looks right.

any help\ideas would be greatly appreciated, thank you for your time.

Your project link(s)

solution: boilerplate-project-exercisetracker - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.53

Challenge: Exercise Tracker

Link to the challenge:

All the responses from the log route are returning an empty array except for the ones with the parameters and two of those have a null in the array.

Use the network tab in the browser to inspect when submitting.

I didn’t really look at the code much but you seem to have an excessive amount of code for this route and it isn’t that easy to read. I think you are making it harder than it has to be. I looked at my version of this route and I have 28 lines of code you have 184 lines of code. See if you can’t simplify it a bit and don’t overdo the logic and value checking.


thanks for pointing out those bugs to me, they really helped me fix everything.

Most of the tests don’t input the date into the add exercise form, and my code for that was faulty, so after fixing it almost all the tests where working

It threw me off that on the second to last test if checks both that date is a string, and that it has a specific value, which is the time that the test was taken in dateString format ( new Date().toDateString() ). After figuring that out the last question was a bit more faulty logic to fix and everything works now.

thank you for your input, it helped a lot.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.