I’m having some trouble with the last bit of the Issue Tracker Quality Assurance project, and want to see if anyone else is experiencing this as well.
If I leave NODE_ENV=test commented out in my .env file when I submit the project, all tests pass except for 2:
You can send a PUT request to /api/issues/{projectname} with an _id and one or more fields to update. On success, the updated_on field should be updated, and returned should be { result: 'successfully updated', '_id': _id } .
All 14 functional tests are complete and passing.
If I uncomment NODE_ENV=test, all of the functional tests pass when I run the app in repl.it, but then all tests fail when submitting the project to FCC.
I also cannot figure out why the requirement for the successful PUT request is not passing when I submit the project. It seems to be working correctly when I submit an update from the front end, and also passes the test in my functional-tests.js.
I was able to figure out the last test “All 14 function tests are complete and passing.” and it now passes with the NODE_ENV=test uncommented in my .env file. However I’m still not able to pass the PUT request with ‘successfully updated’ result test when I submit the project.
When I attempt to submit the project, that test is throwing this error in the console:
Error: expected undefined to be an object
at eval (eval at (frame-runner.js:84), :2:258)
I’m unable to figure out what is causing this error, because it seems that my code should be returning an object here, passes my functional tests, and updates correctly when I test it.
Just had this exact issue with this project. I didn’t event think to consider the implications of my strictly equal in my .get request. Hats off to you!
Many thanks to you for posing the question, and for posting your eventual resolution.
And many thanks to Sky020 for the test suite.