Issue Tracker, only post requests pass

Tell us what’s happening:
I’m trying to finish my issue tracker app, but I’ve run into an issue where the only tests that pass are the post requests. I know that they are all not done yet, but I can’t tell whats wrong with my delete requests or my get requests, as the get request should be passing with no parameters easily.

Your code so far
My repl all routes are in the api.js file.

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36.

Challenge: Issue Tracker

Link to the challenge:

Hello there,

Top Tip: Use your devtools, when you submit, to get more information about the failed tests:

Couple that with the tests: freeCodeCamp/ at master · freeCodeCamp/freeCodeCamp (

Now, you can quite a bit more easily debug.

Hope this helps

1 Like

Thanks so much! being able to find the tests is a HUGE help!

Ok, I’ve gotten a bit more of a handle on things now, that was very helpful!. I’m certainly not done, and realized that I should probably have the mocha tests written, as they’ll help me debug even easier.

I wrote the first one, but it does not work at all. I’m getting the following error:

Tests are not valid:
    test('create with every field', function(done){

SyntaxError: Invalid destructuring assignment target
    at wrapSafe (internal/modules/cjs/loader.js:1053:16)
    at Module._compile (internal/modules/cjs/loader.js:1101:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Function.Module._load (internal/modules/cjs/loader.js:878:14)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at /home/runner/boilerplate-project-issuetracker/node_modules/mocha/lib/mocha.js:394:36
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (/home/runner/boilerplate-project-issuetracker/node_modules/mocha/lib/mocha.js:391:14)
    at (/home/runner/boilerplate-project-issuetracker/node_modules/mocha/lib/mocha.js:970:10)
    at (/home/runner/boilerplate-project-issuetracker/test-runner.js:58:32)
    at Timeout._onTimeout (/home/runner/boilerplate-project-issuetracker/server.js:56:16)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

It is just a small syntax error on this line:

 suite('POST tests',function({

Hope this helps

1 Like

Hi again, If you could possibly help me out again, I’m getting this error in the dev console when I run the free code camp tests on the app .

Error: expected { Object (result, _id) } to deeply equal { Object (error, _id) }
    at eval (eval at <anonymous> (VM66 frame-runner.48f6f4fc3b0f26107e07.js:32), <anonymous>:23:11)

but I’m outputting everything and it is returning the right format object when its supposed to. I really can’t seem to figure out whats going wrong. This appears to be an issue with my put requests.

once again, my repl

On a quick glance, I would say just to be sure you are breaking out of any execution, once you respond. That is, use return res.json(...); where applicable.

Let me know if that helps