it('Should check that api end point for uploading image works', (done)=> { chai.request(devApiEndPoint) .post('/dev/provisional/image') .set('Content-Type', 'application/json') .attach('image', `${uploadFilesRoot}correctImage.jpg`) .then(function(err, res) { chai.expect(res).to.have.status(123); done(); });
it('Should check that api end point for uploading image works', (done)=> { chai.request(devApiEndPoint) .post('/dev/provisional/image') .set('Content-Type', 'application/json') .attach('image', `${uploadFilesRoot}correctImage.jpg`) .then(function(err, res) { chai.expect(res).to.have.status(123); done(); });
Внимательно посмотри на пример из доки который ты кинул