Exercise Tracker - One test left to pass, but it returns right values

Hi, when I run the code it returns all the values as specified in the assignment. When I test the code only one test is not passing. That test is:
The date property of any object in the log array that is returned from GET /api/users/:id/logs should be a string… Use the dateString format of the Date API.
Deployed functionality: https://exercise-tracker-fcc4.herokuapp.com/
GitHub repository: GitHub - jadilovic/exerciseTracker: Exercise Tracker - Back End Development and APIs Projects - FreeCodeCamp
Can anybody help me with this?
Thanks,

Your browser information:

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

Challenge: Exercise Tracker

Why are you passing 0 to the date constructor?

Thank you very much. You question / comment made me think about the code you referred to. I realized that I do not need this whole block of code before each exercise object is pushed to the array. Also, new Date(0) made my code not pass the test so I changed it to current date when new exercise is created. After that all my tests have passed. All best to you! Cheers!

Thank you lasjorg! :grinning:

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