Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0046140Openbravo ERPA. Platformpublic2021-03-24 17:302021-03-25 06:55
AugustoMauch 
AugustoMauch 
immediatemajorhave not tried
closedfixed 
5
 
PR21Q2 
Core
Coding ( Testing )
2021-03-23
pi
https://gitlab.com/openbravo/product/openbravo/-/commit/27a59980bfc52db096819cb3848e2dd8febb2a83 [^]
No
0046140: Parameter passed to npm test are not being taken into account
This changeset [1] introduced a wrapper script around jest in order to use different parameters based on some conditions. The problem is that the parameters that were passed when running npm test are not being forwarded to jest, they are ignored.

[1] https://gitlab.com/openbravo/product/openbravo/-/commit/27a59980bfc52db096819cb3848e2dd8febb2a83 [^]
Execute:

npm test ./modules/org.openbravo.client.application/web-test

It should execute only the tests located following that folder, but instead it is executed all tests.
No tags attached.
Issue History
2021-03-24 17:30AugustoMauchNew Issue
2021-03-24 17:30AugustoMauchAssigned To => AugustoMauch
2021-03-24 17:30AugustoMauchModules => Core
2021-03-24 17:30AugustoMauchRegression level => Coding ( Testing )
2021-03-24 17:30AugustoMauchRegression date => 2021-03-23
2021-03-24 17:30AugustoMauchRegression introduced in release => pi
2021-03-24 17:30AugustoMauchRegression introduced by commit => https://gitlab.com/openbravo/product/openbravo/-/commit/27a59980bfc52db096819cb3848e2dd8febb2a83 [^]
2021-03-24 17:30AugustoMauchTriggers an Emergency Pack => No
2021-03-24 17:46hgbotNote Added: 0126893
2021-03-25 06:55hgbotResolutionopen => fixed
2021-03-25 06:55hgbotStatusnew => closed
2021-03-25 06:55hgbotNote Added: 0126901
2021-03-25 06:55hgbotFixed in Version => PR21Q2
2021-03-25 06:55hgbotNote Added: 0126902

Notes
(0126893)
hgbot   
2021-03-24 17:46   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/337 [^]
(0126901)
hgbot   
2021-03-25 06:55   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/337 [^]
(0126902)
hgbot   
2021-03-25 06:55   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 6c6dcde7faf431bb66a30496893e8638fbfe27c2
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 2021-03-24T18:23:58+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/6c6dcde7faf431bb66a30496893e8638fbfe27c2 [^]

Fixes BUG-46140: parameters can be passed to npm test and npm coverage

Now all parameters are forwarded from run-tests to jest.

Both positional parameters and named parameters are supported. Remember that in order to pass named
parameters to npm test they must be included after -- [1]

Tests done:
npm test (executes all tests)
npm test modules/org.openbravo.client.application/web-test/ob-utilities-date.test.js (executes single test)
npm coverage modules/org.openbravo.client.application/web-test/ob-utilities-date.test.js (executes coverage for single test)

[1] https://jestjs.io/docs/cli/#using-with-npm-scripts [^]

---
M modules/org.openbravo.client.kernel/test-scripts/run-tests
M package.json
---