Exercise Tracker test 4-5 fail

I dont know why my project doesnt pass test 4 and 5 even though it is working as it is supposed to. would be helpful if someone could look into the code and help me. thanks!

Challenge: Exercise Tracker

Link to the challenge:

I tried out your app. This was the response when I created an exercise for my favourite Mr Men character.

    "username": "mrgreedy",
    "userId": "bdIMBSFL3",
    "description": "push ups",
    "duration": "4",
    "date": "2020-06-22T10:37:37.556Z"

You are passing duration as a string in your response. It isn’t explained anywhere AFAIK but it should be a number. Also your date is not what is expected. It should look like this (I think) “Mon Jun 22 2020”. Look for a method on the Date object which returns a string like that.

By the way, the title of your post says you are having trouble with test 4-5 but the content says test 3 and 4. Let us know which.

1 Like

Thanks! I did as you said but still it doesnt pass the test 4 and 5. sorry for the earlier confusion hehe

Maybe the expected key for the user ID is not userId but “_id” or “id”