I need help to solve my problem with testing on nodes. I use mocha and supertest. I am confused with the implementation in a super test. I do not know how to solve this. I am trying to automate a file upload.
`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(); }); }); });
Saitama
source share