forwardemail / forwardemail/supertest

Superset is not setting headers correctly

Open
#693 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
14.4k
Forks
782
PR merge metrics
No merged PRs in 30d

Description

Supertest is not setting headers. Here is the code:

it('should fail getting all users, reason role = user', async () => {
const data = await request(app)
.get('/user/all')
.set('Authorization', token)
.expect(({ header, headers }) => {
console.log('--------------------');
console.log(headers);
console.log('--------------------');
})
.expect(HttpStatus.OK);
});

Tried with:
```
.set({
Authorization: token
})
```
as well not added.

**Actual:** Authorization header is missing

**Expected:** Authorization header to be part of the headers body

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.