Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0053962
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[POS2] POSminorhave not tried2023-11-16 13:562023-11-17 13:22
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionopenFixed in Version
StatusscheduledFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0053962: The quality of many jest unit tests can be improved, replacing dependencies withs mocks

DescriptionWee have identified several cases where a component is very simple (i.e. CashupProcess [1]) but its test requires a lot of setup because it is using the dependencies (both direct and indirect) of the component it is testing, instead of mocking them like they should in unit tests.

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/c78aa8b8c92612072140ef9d21545e355cdd2b40/web-jspack/org.openbravo.pos2/src/components/Cashup/CashupProcess/CashupProcess.jsx [^]
[2] https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2/-/blob/c78aa8b8c92612072140ef9d21545e355cdd2b40/web-jspack/org.openbravo.pos2/src/components/Cashup/CashupProcess/__test__/CashupProcess.test.jsx [^]
Steps To Reproduce-
Proposed SolutionMock dependencies instead of testing the real ones
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0157285)
hgbot (developer)
2023-11-17 13:22

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/merge_requests/1288 [^]

- Issue History
Date Modified Username Field Change
2023-11-16 13:56 AugustoMauch New Issue
2023-11-16 13:56 AugustoMauch Assigned To => AugustoMauch
2023-11-16 13:56 AugustoMauch Triggers an Emergency Pack => No
2023-11-16 13:56 AugustoMauch Status new => scheduled
2023-11-17 13:22 hgbot Note Added: 0157285


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker