772810
我想单元测试 token的验证代码 我把token放在header 的 Authorization中。 请问如何添加header。 我使用下面的方法是错误的
it.only('post /data', async () => {
const result = await app.httpRequest()
.post('/data')
.header({
Authorization: '11111',
})
.type('form')
.send({ test: 'admin', test: 'root' });
console.log(result.body);
});