Open
Description
Describe the bug
Node.js version: v22.1.0
OS version: MacOS Sonoma 14.4.1(23E224)
Description: From node 22 version, Array.isArray has been deprecated (https://nodejs.org/api/deprecations.html)
request(app.getHttpServer())
.post(router)
.set('Content-Type', 'multipart/form-data')
.field('country', data.country)
.field('businessLocation', data.businessLocation)
.attach('file', 'test/resources/image.png')
.expect(HttpStatus.CREATED)
.expect(({ body }) => {
expect(body).toBeDefined();
});
(node:13214) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
When you run code on Webstorm, get the above log and when you run it on cli, get the log Aborted
.
Maybe using isArray
inside the field
and attach
functions.
Checklist
- I have searched through GitHub issues for similar issues.
- I have completely read through the README and documentation.
- I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.