I cannot pass this test and don’t understand why, I believe my code already does this:
The response returned from POST /api/users/:_id/exercises will be the user object with the exercise fields added.
The response returned from POST(etc) by my code is exactly the same response as the example project they provide!
I cannot pass this test either and don’t understand why either:
Each item in the `log` array that is returned from `GET /api/users/:id/logs` is an object that should have a `description` , `duration` , and `date` properties.
The response returned from GET(etc) by my code is exactly the same response as the example project they provide too!
Finally, I cannot pass this test but my code already does it:
property of any object in thelog
array that is returned fromGET /api/users/:id/logs
should be a string.. Use thedateString
format of theDate
My dates are already in string format, so why is the test not being passed by my code either?
Thanks for your time
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
Challenge: Exercise Tracker
Link to the challenge:
Hello jaimeggb. I have exactly the same problem. I pass all the others tests except this. The strange thing is: when I test the api, date output is as it should be
@sergio.bianco Yep, quite strange, I hope someone can help us with this , otherwise we cannot complete the course
Same here. I also face this issue. I check using
typeof and the output is string. Here’s the link to my code: boilerplate-project-exercisetracker-1 - Replit
@CharaeKeow Perhaps the issue is with the FCC tester? Let’s see if someone knows what we could attempt to fix this
The demo project is not likely to be passing if it was an issue with the tests.
The test is expecting an object with the properties…
…on it, not a log object property.
The date format is not correct. Try using
toDateString as the challenge text hints at, without substring.
The date will not be an empty string when not supplied (log it out).
When I fix the return object and use the correct date format your project passes the tests.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.