forwardemail / forwardemail/supertest
False-positive body diff's
- Dominant language
- JavaScript
- Stars
- 14.4k
- Forks
- 782
- PR merge metrics
- No merged PRs in 30d
Description
When asserting JSON responses, the output is useless:
```
expected { data: { objects: { pageInfo: [Object], edges: [Array] } } } response body, got { data: { objects: { pageInfo: [Object], edges: [Array] } } }
```
The issue is that one of the nested fields is missing in the response but it's impossible to understand it from the output.
Code to reproduce:
```ts
request(app.getHttpServer())
.post('/graphql')
.send({ query, variables })
.expect(200)
.expect({
data: {
objects: {
pageInfo: {
endCursor: dateToBase64(obj.createdAt),
hasNextPage: false,
},
edges: [
{
cursor: dateToBase64(obj.createdAt),
node: omit(obj, ['createdAt', 'updatedAt']),
},
],
},
},
});
```
Contributor guide
Assessment
This issue has not been assessed yet.