supertest
supertest copied to clipboard
expect(500) passes if statusCode is undefined
Was just using this library to write a test.
Being TDD, I wrote the test first and was expecting the code to return 500.
But the code was never written and actually threw so statusCode
was not defined.
The test passed.
Don't think 500 === undefined
is correct. I believe expect
should fail in that case.
Any example project / code snippet ?