Exercise Tracker - issue on testing

Dear friends, this is my first post at this forum.

I would like to report something which I’m not sure it’s a bug, but it’s certainly a misleading issue.

I had my Exercise Tracker project pretty much done, but I kept having an error on test 4:
“I can retrieve a full exercise log of any user by getting /api/exercise/log with a parameter of userId(_id). App will return the user object with added array log and count (total exercise count).”

The curious thing, is that the following test, test 5, which is also related to the log function, was alright…

I’ve spent hours and hours reading and testing, and eventually noticed that I’ve failed to implement the following feature on test 3: “If no date supplied it will use current date. App will return the user object with the exercise fields added.”. My app was returning an error when the user was not inputing a date when creating an exercise.

After implementing the mentioned feature, test 4 ran positive, and I’ve finished the challenge.

The whole problem is that the feature I didn’t implement was required on test 3, but test 3 was returning correct, and I had a false error flag on test 4.

I suggest that the verification for handling exercise addition queries without the “date” parameter is done on Test 3, and not 4, where this feature is not mentioned.

In case this is not possible, I hope this topic helps someone who eventually faces the same dead end I was on.

2 Likes