[SOLVED] HELP REQUEST - Timestamp Microservice

[SOLVED] HELP REQUEST - Timestamp Microservice
0

My code is available here:

All tests pass bar one: “It should return the expected error message for an invalid date”.

Looking at the data that’s sent I get a correct response in the browser.

https://azure-podium.glitch.me/api/timestamp/this-is-not-a-date

Can anyone help?

This looks correct to me and nothing obvious is jumping out. I remixed it and tried to run it myself, getting the same failed test. Below is a console log I get (chrome) … which I don’t see rerunning my project.

I believe this is an issue with the test and not my code.

I have found the issue. The test is looking for a different response for invalid dates. The boilerplate project has a different user story from the curse-arrow project.

Point 5 in boilerplate has return {“unix” : null, “utc” : “Invalid Date” } but the curse-arrow has {“error”: “Invalid Date”}. The test is expecting the latter response. Once I fixed this it started passing.

Probably easiest for FCC to fix the user story on the boilerplate project.