You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I run jest routes/lots there are two tests that fail, giving the wrong status code.
Upon examination and debugging, It is a problem with return next(err) (backend/middleware.js line 56)
Before that line, the error is 401 Unauthorized as expected, but after in the general error handler (backend/app.js) it is a 500 Server error ("ReferenceError: setImmediate is not defined")
Ive done a bunch of research on this and can't find anyone having this problem...
To Reproduce
Steps to reproduce the behavior:
add console.log(err) to line 35 backend/app.js
add console.log(err) to line 58 backend/middleware/auth.js
jest routes/lots.test.js
See the two errors per failed test, one a 401 Unauthorized, the second a 500 with the ReferenceError issue
The text was updated successfully, but these errors were encountered:
jest routes/auth --detectOpenHandles also triggers the setImmediate is not defined but leaves jest hanging
Meryldominguez
changed the title
Testing jest routes/lots triggers Express error?
Testing jest routes triggers hidden Express error (ReferenceError: setImmediate is not defined)
Jul 24, 2021
Meryldominguez
changed the title
Testing jest routes triggers hidden Express error (ReferenceError: setImmediate is not defined)
Testing /routes/... triggers possible Express error (ReferenceError: setImmediate is not defined)
Jul 24, 2021
Describe the bug
When I run
jest routes/lots
there are two tests that fail, giving the wrong status code.Upon examination and debugging, It is a problem with
return next(err)
(backend/middleware.js line 56)Before that line, the error is 401 Unauthorized as expected, but after in the general error handler (backend/app.js) it is a 500 Server error ("ReferenceError: setImmediate is not defined")
Ive done a bunch of research on this and can't find anyone having this problem...
To Reproduce
Steps to reproduce the behavior:
console.log(err)
to line 35 backend/app.jsconsole.log(err)
to line 58 backend/middleware/auth.jsjest routes/lots.test.js
The text was updated successfully, but these errors were encountered: