Openbravo Issue Tracking System - POS2
View Issue Details
0048697POS2Corepublic2022-03-01 12:152022-03-17 14:39
jorge-garcia 
Triage Platform Base 
normalminorhave not tried
acknowledgedopen 
5
 
 
No
0048697: Find a way to test processImage.test.js in case the size and file extension are correct
Jest is not able to work with javascript new Image onLoad method, making test to fail due to a timeout.
-
I found some links that could be useful for this case

https://raminmousavi.medium.com/mock-img-element-in-jest-3341c495ca8b [^]
https://lzomedia.com/blog/jest-testing-an-asynchronous-image-upload-in-react/ [^]

The idea is to find a good solution to this problem
 
No tags attached.
related to feature request 0047995 closed caristu Create a component for uploading images 
Issue History
2022-03-01 12:15jorge-garciaNew Issue
2022-03-01 12:15jorge-garciaAssigned To => Triage Platform Base
2022-03-01 12:15jorge-garciaTriggers an Emergency Pack => No
2022-03-01 12:16jorge-garciaRelationship addedrelated to 0047995
2022-03-17 14:38AugustoMauchSummaryFound a way to test processImage.test.js in case the size and file extension are correct => Find a way to test processImage.test.js in case the size and file extension are correct
2022-03-17 14:39AugustoMauchStatusnew => acknowledged

There are no notes attached to this issue.