Everything Works fine in the code… But I am getting
// running tests
An empty date parameter should return the current time in a JSON object with a unix key
An empty date parameter should return the current time in a JSON object with a utc key
// tests completed
When I console log the request… I could not see the empty date test case in that… I am getting valid or invalid date for each request… Then How can I run the project without failure
I just finished this yesterday. What you need to handle is a get request going to your project at [project-url]/api without a subsequent /:date being passed. This would be the ‘empty date parameter’ and in this response your microservice should respond with JSON of the current unix time in milliseconds and the current utc date/time.
If you are handling this empty /api/ request , then it may be a timezone related issue or a computer clock issue. For example, my computer was about 30 seconds behind UTC time and it was failing this test, I tried to run the tests on another computer that didn’t have a time difference with UTC and then it passed.
It worked… After adding /api as a separate request… Thanks
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.