Cannot pass 3 tests which I believe are already being passed :/

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:
The dateproperty of any object in thelogarray that is returned fromGET /api/users/:id/logsshould be a string.. Use thedateStringformat of theDate API.
My dates are already in string format, so why is the test not being passed by my code either?

Thanks for your time

Jaime

https://boilerplate-project-exercisetracker-1.jaimeggb.repl.co

solution: https://replit.com/@jaimeggb/boilerplate-project-exercisetracker-1

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

1 Like

@sergio.bianco Yep, quite strange, I hope someone can help us with this :crossed_fingers:, otherwise we cannot complete the course :confused:

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

1 Like

@CharaeKeow Perhaps the issue is with the FCC tester? Let’s see if someone knows what we could attempt to fix this

1 Like

The demo project is not likely to be passing if it was an issue with the tests.


  1. The test is expecting an object with the properties…
description
duration
date

…on it, not a log object property.

  1. The date format is not correct. Try using toDateString as the challenge text hints at, without substring.

  2. 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.

1 Like

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