From e7a051c0fff27613353c7372b2795a0e26b4f885 Mon Sep 17 00:00:00 2001 From: Jayden Seric Date: Mon, 7 Oct 2024 19:25:17 +1100 Subject: [PATCH] Remove an unnecessary `await` in tests. --- changelog.md | 1 + processRequest.test.mjs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index e734856..f3b9476 100644 --- a/changelog.md +++ b/changelog.md @@ -42,6 +42,7 @@ - Removed the Node.js CLI option `--unhandled-rejections=throw` in the package script `tests` as it’s now the default for all supported Node.js versions. - Avoid hardcoding a default value in the type `FileUploadCreateReadStreamOptions` property `highWaterMark` description and use the function `getDefaultHighWaterMark` from `node:stream` in tests. - Replaced the test helper class `Deferred` with polyfilled `Promise.withResolvers`. +- Removed an unnecessary `await` in tests. - Omit unused catch bindings in the function `processRequest`. - Corrected the JSDoc type `FileUploadCreateReadStreamOptions` in the module `processRequest.mjs`. - Avoid using `return` in the middleware. diff --git a/processRequest.test.mjs b/processRequest.test.mjs index 4f03bc7..90e93e5 100644 --- a/processRequest.test.mjs +++ b/processRequest.test.mjs @@ -686,7 +686,7 @@ describe( const { createReadStream } = await operation.variables.files[0].promise; - await throws( + throws( () => { createReadStream(); },