Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supertest 4.x.x throws if not HTTP/200 #559

Closed
karlismelderis opened this issue Mar 14, 2019 · 2 comments
Closed

supertest 4.x.x throws if not HTTP/200 #559

karlismelderis opened this issue Mar 14, 2019 · 2 comments

Comments

@karlismelderis
Copy link

this stopped working for us after upgrade to 4.0.0

const response = await request(app).get(path);
expect(response.status).toBe(500);
expect(response.body).toMatchSnapshot();

now it's throwing an error

Internal Server Error

      at Test.Object.<anonymous>.Request.callback (node_modules/supertest/node_modules/superagent/lib/node/index.js:804:15)
      at parser (node_modules/supertest/node_modules/superagent/lib/node/index.js:1036:18)
      at IncomingMessage.res.on (node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
@rimiti
Copy link
Contributor

rimiti commented Mar 14, 2019

Thank you for feedback. 🙏

Please, check the related PR: #558

@rimiti
Copy link
Contributor

rimiti commented Mar 15, 2019

#558 merged, I close this issue.

Thank you 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants