Skip to content

Commit

Permalink
Merge pull request #89 from jaydenseric/refactor-tests
Browse files Browse the repository at this point in the history
Test files to upload are created in context, rather than using arbitrary project files.
  • Loading branch information
jaydenseric authored Jul 20, 2018
2 parents 2a507ee + a96b188 commit 07cfac2
Show file tree
Hide file tree
Showing 4 changed files with 389 additions and 387 deletions.
Binary file removed Belvedere_Apollo_Pio-Clementino_Inv1015.jpg
Binary file not shown.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- Test middleware error response status codes.
- Test behavior of aborted HTTP requests.
- Test that the app can respond if an upload is not handled.
- Test files to upload are created in context, rather than using arbitrary project files, via [#89](https://github.com/jaydenseric/apollo-upload-server/pull/89).
- Improved `package.json` scripts:
- Leveraged `npm-run-all` more for parallelism and reduced noise.
- Removed the clean script `rimraf` dev dependency in favour of native `rm -rf`. Leaner and faster; we only support \*nix now for contributing anyway.
Expand Down
5 changes: 4 additions & 1 deletion src/middleware.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ export const processRequest = (
})
}
// Discard the unexpected file.
else stream.resume()
else {
stream.on('error', () => {})
stream.resume()
}
})

parser.once('filesLimit', () => {
Expand Down
Loading

0 comments on commit 07cfac2

Please sign in to comment.