Openbravo Issue Tracking System - POS2
View Issue Details
0049048POS2POSpublic2022-04-06 14:532022-06-07 22:37
jarmendariz 
jarmendariz 
highmajorhave not tried
closedfixed 
5
 
TAP 
jarmendariz
No
0049048: Improve jest tests to make them compatible with Node 16
Some tests are passing with the current Node version (v14), but v16 introduces some changes that makes a few test fails.

At the moment we only noticed two scenarios:

1- In ErrorHandler.test.js, the runtime exception message changed from - "Cannot read property 'b' of undefined" to "Cannot read properties of undefined (reading 'b')

2- Unhandled Promise rejection warning:
Currently in v14 the following message appears:

(node:539993) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode [^]). (rejection id: 2)
(node:539993) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Starting from v16, those warnings becomes errors, so it would be nice to fix them as soon as possible.
See description
No tags attached.
blocks defect 0048987 closed jarmendariz Improve jest tests to make them compatible with Node 16 
Issue History
2022-04-13 09:12jarmendarizTypedefect => backport
2022-04-13 09:12jarmendarizTarget Version => TAP
2022-06-07 22:37jarmendarizNote Added: 0138139
2022-06-07 22:37jarmendarizStatusscheduled => resolved
2022-06-07 22:37jarmendarizResolutionopen => fixed
2022-06-07 22:37jarmendarizReview Assigned To => jarmendariz
2022-06-07 22:37jarmendarizStatusresolved => closed

Notes
(0138139)
jarmendariz   
2022-06-07 22:37   
Fixed on MR: https://gitlab.com/obcustomers/AGAP/org.openbravo.core2/-/merge_requests/79 [^]