So when I log your updated project (from the end of the PUT route), it produces
issue_title: 'Faux Issue Title',
issue_text: 'Functional Test - Required Fields Only',
issue_title: 'Faux Issue Title 2',
issue_text: 'Functional Test - Every field filled in',
assigned_to: 'Chai and Mocha',
issue_title: 'Issue to be Updated',
issue_text: 'New Issue Text',
The last one is the updated issue (note the time difference). The test does its thing, and then reports an error in the browser console of
Error: expected 1634342623050 to be above 1634342623050. Those are times in milliseconds since the epoch and are the times for the first issue (no magic; the ‘050’ matches). So for whatever reason, the test is finding the first issue when it checks for updates and not the updated one.
I would check that the GET issue stuff is working as it should be, double check that no issues are getting reordered or new ids assigned, and then maybe try putting the updated issue first with
unshift() instead of last with
push(). Sometimes you also need to start with a clean DB (I did to no avail).
It may also be worthwhile to read the test source in fCC’s repo. These kinds of tests are difficult to debug since they use your project’s POST and GET routes to check the PUT and DELETE routes, so they all have to be working flawlessly to pass. You may also discover the problem by writing your functional tests for the last test.