Skip to content

Commit 51622b1

Browse files
committed
Fix test
1 parent a196997 commit 51622b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/rest/REST_test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ describe('REST - Form upload', () => {
319319
})
320320

321321
describe('upload file', () => {
322-
it('should show error when file size exceedes the permit', async () => {
322+
it('should show error when file size exceedes the permit', async (done) => {
323323
const form = new FormData()
324324
form.append('file', fs.createReadStream(testFile))
325325

@@ -328,9 +328,10 @@ describe('REST - Form upload', () => {
328328
} catch (error) {
329329
error.message.should.eql('Request body larger than maxBodyLength limit')
330330
}
331+
done();
331332
})
332333

333-
it('should not show error when file size doesnt exceedes the permit', async () => {
334+
it('should not show error when file size doesnt exceedes the permit', async (done) => {
334335
const form = new FormData()
335336
form.append('file', fs.createReadStream(testFile))
336337

@@ -340,6 +341,7 @@ describe('REST - Form upload', () => {
340341
} catch (error) {
341342
console.log(error.message)
342343
}
344+
done();
343345
})
344346
})
345347
})

0 commit comments

Comments
 (0)