Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0047891Openbravo ERPA. Platformpublic2021-10-20 09:532022-09-06 11:38
jarmendariz 
Triage Platform Base 
normalminorhave not tried
newopen 
5
 
 
Core
No
0047891: Upgrade Jest from 26.6.0 to its latest version
In order to remain updated and take advantage of new features/bugfixes/optimizations introduced by jest devs, we should update to the new major version and fix any issue caused by the breaking changes if any.

Check Jest changelog for a summary of changes. Breaking ones are marked in bold: https://github.com/facebook/jest/blob/main/CHANGELOG.md [^]
Upgrade Jest and related plugins and check that tests still works as expected.

Also it's a good oportunity to clean up a bit of our codebase. For example, Jest 27 introduces this change:

Use "modern" implementation as default for fake timers (0010874 & 0011197). With this upgrade we can remove the following line present in some tests:

jest.useFakeTimers('modern');

No tags attached.
related to defect 0047534 closed jarmendariz Update package-lock.json to fix npm audit issues 
Issue History
2021-10-20 09:53jarmendarizNew Issue
2021-10-20 09:53jarmendarizAssigned To => platform
2021-10-20 09:53jarmendarizModules => Core
2021-10-20 09:53jarmendarizTriggers an Emergency Pack => No
2021-10-20 09:56jarmendarizRelationship addedrelated to 0047534
2021-10-20 13:11AugustoMauchTypedefect => feature request
2022-01-27 12:50cbernerNote Added: 0134609
2022-01-27 12:50cbernerAssigned Toplatform => Triage Platform Base
2022-09-06 11:38jarmendarizSummaryUpgrade Jest from 26.6.0 to 27.x.x => Upgrade Jest from 26.6.0 to its latest version

Notes
(0134609)
cberner   
2022-01-27 12:50   
When updating, please check usages of setImmediate in jest tests and change them to either be jest.requirreActual('timers').setImmediate, or use process.nextTick.
For more info: https://stackoverflow.com/a/51045733 [^]