AV
it('should delete token from db', async () => {
const res = await request
.get('/login')
.set('Content-Type', 'application/json')
.set("Authorization", "Bearer " + token);
expect(res.body.error).to.be.equal(false);
expect(res).to.have.status(200);
});
/bearer
отдаст 200 на запрос с любым токеном и 401 на запросы без Authorization хедераhttps://httpbin.org/#/operations/Auth/get_bearer