Skip to content

Commit

Permalink
Also test in onUploadFinish
Browse files Browse the repository at this point in the history
  • Loading branch information
Murderlon committed Jun 6, 2024
1 parent 318ca6d commit 1f7343a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/server/test/Server.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
/* eslint-disable no-throw-literal */
import 'should'

Expand Down Expand Up @@ -496,7 +497,9 @@ describe('Server', () => {
const server = new Server({
path: '/test/output',
datastore: new FileStore({directory}),
onUploadFinish() {
onUploadFinish(_, __, upload) {
assert.ok(upload.storage!.path, 'should have storage.path')
assert.ok(upload.storage!.type, 'should have storage.type')
throw {body: 'no', status_code: 500}
},
})
Expand Down

0 comments on commit 1f7343a

Please sign in to comment.