Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashohn committed Nov 13, 2024
1 parent a196997 commit 51622b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/rest/REST_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ describe('REST - Form upload', () => {
})

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

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

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

Expand All @@ -340,6 +341,7 @@ describe('REST - Form upload', () => {
} catch (error) {
console.log(error.message)
}
done();
})
})
})

0 comments on commit 51622b1

Please sign in to comment.