[FOLIO-2449] Requested update to sonar exclusions Created: 06/Feb/20  Updated: 03/Jun/20  Resolved: 19/Feb/20

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Task Priority: P3
Reporter: Ian Hardy Assignee: Ian Hardy
Resolution: Done Votes: 0
Labels: devops, devops-backlog, platform-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Sprint:
Development Team: FOLIO DevOps

 Description   

Hi guys,
could you please update https://github.com/folio-org/jenkins-pipeline-libs/blob/master/vars/sonarqubeScanNPM.groovy#L15 to include */.test.js ?
fork is disabled and I can't do it :disappointed:
purpose: we want to separate tests (jest (.test.js + near to component) and bigtest (-test.js + bigtest folder) by naming and folder) and unit tests are included in sonar report, it would be nice to exclude them



 Comments   
Comment by Ian Hardy [ 06/Feb/20 ]

Hi Mikita Siadykh can the jest tests (.test.js + near to component) just be called -test.js and kept near the component, or would that cause a problem? If they need to be called .test.js, I don't see why not. cc Zak Burke and others more in touch to stripes unit testing for a chance to comment.

Comment by Zak Burke [ 06/Feb/20 ]

Practically speaking, adding a new file-name exclusion is easy, but the reason for doing so (adding Jest tests when BigTest is or de facto standard) deserves a discussion. That discussion started on Slack and we plan to continue it at a #stripes-architecture meeting next week before committing to this change.

Comment by Jakub Skoczen [ 10/Feb/20 ]

Ok Zak Burke we'll block this then.

Comment by Zak Burke [ 13/Feb/20 ]

The conclusion after a discussion at #stripes-architecture on 2020-02-13 was that Jest and react-testing-library are worth supporting. So: Yes, let's add .test.js files to SonarCloud's list of files to exclude when calculating it's "coverage of new code" metric.

Generated at Thu Feb 08 23:20:43 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.