我需要一些帮助来解决我在nodejs代码上测试的问题.我正在使用摩卡和超级.我对supertest中的实现感到困惑.我不知道解决了.我正在尝试自动下载文件.
`describe('GET /entry/:entryId/file/:id/download', function(){
it('should pass download function', function(done){
this.timeout(15000);
request(app.webServer)
.get('/entry/543CGsdadtrE/file/wDRDasdDASAS/download')
.set('Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGco')
.expect(200)
.end(function(err, res){
if (err) return done(err);
console.log(err, res);
done();
});
});
});
Run Code Online (Sandbox Code Playgroud)