Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: correct unhandled error events
build-request-file-object.test.js and get-content-type.test.js both make use of streams with non-existent paths to check errors. Possibly since upgrading jest these cause suites to fail with e.g. ``` Error: ENOENT: no such file or directory, open '/fake/path/custom-name.env' Emitted 'error' event on ReadStream instance at: at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -2, code: 'ENOENT', syscall: 'open', path: '/fake/path/custom-name.env' ``` Since the errors are expected for these tests add a no-op handler to handle the error events. Signed-off-by: Rich Ellis <[email protected]>
- Loading branch information