Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0046181Openbravo ERPA. Platformpublic2021-03-30 13:212021-03-30 13:32
AugustoMauch 
AugustoMauch 
normalmajorhave not tried
closedfixed 
5
 
PR21Q2 
Core
No
0046181: Jest tests should not fail if no tests are found
If npm test is executed passing as parameter a path where no matching test can be found, execution will fail with an error like this:

No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In /srv/ci/workspace/mod-simple-ci23.18101
12844 files checked.
testMatch: **/web-test/**/?(*.)+(test).[jt]s?(x), **/web-jspack/**/?(*.)+(test).[jt]s?(x) - 209 matches
testPathIgnorePatterns: web-jspack - 12824 matches
testRegex: - 0 matches
Pattern: org.openbravo.retail.trainingmode - 0 matches
npm ERR! Test failed. See above for more details.
In a retail environment, install the org.openbravo.retail.trainingmode and then run:

npm test modules/org.openbravo.retail.trainingmode

It will fail with the error mentioned in the description.
Add the --passWithNoTests parameter to jest
No tags attached.
Issue History
2021-03-30 13:21AugustoMauchNew Issue
2021-03-30 13:21AugustoMauchAssigned To => AugustoMauch
2021-03-30 13:21AugustoMauchModules => Core
2021-03-30 13:21AugustoMauchTriggers an Emergency Pack => No
2021-03-30 13:25hgbotNote Added: 0127027
2021-03-30 13:32hgbotResolutionopen => fixed
2021-03-30 13:32hgbotStatusnew => closed
2021-03-30 13:32hgbotFixed in Version => PR21Q2
2021-03-30 13:32hgbotNote Added: 0127028
2021-03-30 13:32hgbotNote Added: 0127029

Notes
(0127027)
hgbot   
2021-03-30 13:25   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/340 [^]
(0127028)
hgbot   
2021-03-30 13:32   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: baa4b2a226bfbd2154e1e79c0821319ada628076
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 2021-03-30T13:24:15+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/baa4b2a226bfbd2154e1e79c0821319ada628076 [^]

Fixes ISSUE-46181: Jest should not fail if no tests are found

---
M modules/org.openbravo.client.kernel/test-scripts/run-tests
---
(0127029)
hgbot   
2021-03-30 13:32   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/340 [^]