title: How to get code coverage report from jest-junit in React project
body: <p>According to this <a href="https://medium.com/@elisegev/running-tests-and-creating-code-coverage-reports-for-react-nodejs-project-continuously-with-60312b6a2dd0" rel="noreferrer">article</a> I'd like to get jest-junit code coverage report (Option 2 in article)</p>
  
  <p>So, in my package.json I invoke jest like this: <code>"test": "jest --config=jest.config.js",</code> </p>
  
  <p>jest.config.js includes these settings: </p>
  
  <pre><code>module.exports = {
    preset: 'react-native',
    moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
    setupFiles: ['./jest.setup.js'],
    collectCoverage: true,
    coverageDirectory: 'src/testCoverage',
    coverageReporters: [ "text"],
    reporters: ["default",
          ["jest-junit", {usePathForSuiteName: true, outputDirectory: 'src/testCoverage'}]
        ],
    testResultsProcessor: "jest-junit"
  };
  </code></pre>
  
  <p>I did in this way because the written jest code in package.json doesn't work for me.</p>
  
  <p>When I execute <code>npm run test</code> I get coverage data in src/testCoverage folder and junit.xml</p>
  
  <p>Then I execute test stage in Jenkins pipeline:</p>
  
  <pre><code>stage('test') {
          steps{
          sh script:'''
            #!/bin/bash
            npm install -g yarn
            yarn install
            yarn add --dev jest-junit
            npm run test
          '''
          }
          post {
          always {
            junit 'src/testCoverage/junit.xml'
          }
        }
      }
  </code></pre>
  
  <p>But I don't see junit coverage report in Jenkins, while the article says that </p>
  
  <blockquote>
    <p>The line calling junit will publish the report that npm run test created</p>
  </blockquote>
  
  <p>The only thing that I have - this is test result report of passed and failed tests.</p>
  
  <p>Why I don't get junit coverage report in Jenkins? What should I do or change?</p>