Exercise Tracker potentially flaky tests?

Trying to get past Exercise Tracker task.

got stuck on a

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.

judging the assertion on the expected date: https://github.com/freeCodeCamp/freeCodeCamp/blob/35865ed48c5a9a6fa485eaae0b8fe9c6c35f4ba9/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md?plain=1#L522

Won’t this fail if I and my server are in different time zones?

Another problematic one is:

The response returned from POST /api/users/:_id/exercises will be the user object with the exercise fields added.

It failed for me until I’ve changed the order of keys as in expected object from test
I’m not sure what kind of assert.deepEqual is used there, but maybe it is the root cause

Yeah, I had to set my computer’s time to UTC in order for the tests to pass

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