Skip to content

Commit 45aca40

Browse files
authored
Fix failing CI pipeline for Node 12 (#68)
* add callback * update callback * remove log line
1 parent 49f8436 commit 45aca40

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/upload.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,12 @@ describe("File upload", function () {
179179
expect(this.req.headers["content-type"]).include("multipart/form-data; boundary=---------------------");
180180
var boundary = this.req.headers["content-type"].replace("multipart/form-data; boundary=","");
181181
expect(requestBody.length).equal(15000347);
182-
done()
183182
})
184183

185-
imagekit.upload(fileOptions);
184+
imagekit.upload(fileOptions, function (err, result) {
185+
expect(err).to.equal(null)
186+
done();
187+
});
186188
});
187189

188190
it('Missing useUniqueFileName', function (done) {
@@ -279,7 +281,6 @@ describe("File upload", function () {
279281
imagekit.upload(fileOptions, callback);
280282

281283
setTimeout( () => {
282-
console.log(callback.called, callback.calledOnce)
283284
expect(callback.calledOnce).to.be.true;
284285
sinon.assert.calledWith(callback, null, uploadSuccessResponseObj);
285286
done();

0 commit comments

Comments
 (0)