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
We use supertest to run our tests in this module. While that tool does a great job, I'm not sure if we're making reliable tests, since Supertest also handles the body according to the content-type, which makes me question whether we're doing good tests or if in the future the tests will stop being reliable as we update that dependency.
Supertest only parses the body asserts against the parsed body if you assert against an object, but when doing a string assertion it compares against the raw res.text
Which is to say, it's something important to think about. And we could explore lower level tests to ensure we are asserting against an unparsed response body.
Currently, we should be fine asserting against res.text by passing the body to expect as a string or regexp
We use supertest to run our tests in this module. While that tool does a great job, I'm not sure if we're making reliable tests, since Supertest also handles the body according to the
content-type
, which makes me question whether we're doing good tests or if in the future the tests will stop being reliable as we update that dependency.Ref: ladjs/superagent#1812
cc: @Phillip9587, @jonchurch, @wesleytodd, @UlisesGascon
The text was updated successfully, but these errors were encountered: