I got this test to pass when it shouldn’t
I don’t think the test checks for the second part correctly. “If no date is supplied, the current date will be used.”
let requireDate = new Date(date);
the date argument is req.body.date in this case and thus the code does not account for if the date is not supplied.
This creates confusion because the following tests do not pass as a result.
The following change made all the tests pass. This shows that test 7 is the issue that makes the other tests not pass and thus test 7 should not have passed in the first place.
let requireDate = date? new Date(date) : new Date();
Here are my repls:
https://replit.com/@PoulaSedra1/boilerplate-project-exercisetracker-test7-issue
https://replit.com/@PoulaSedra1/boilerplate-project-exercisetracker
Let me know if more information is needed.