The job generates a unit test report that you will find here: `NODE_PROJECT_DIR/reports/unit_test_report.xml`.
The job generates a unit test report that you will find here: `NODE_PROJECT_DIR/reports/node-test.xunit.xml`.
#### Unit testing with Jest
@@ -79,9 +79,9 @@ For coverage, Jest comes built-in with **Istanbul** package. So no need for extr
},
```
##### Junit Report
##### JUnit Report
By default Jest doesn't generate any test report supported by GitLab. To do so you need to use the [jest-junit](https://www.npmjs.com/package/jest-junit) package.
By default Jest doesn't generate any test report supported by GitLab. To do so, you need to use the [jest-junit](https://www.npmjs.com/package/jest-junit) package.
Add the package as a development dependency:
@@ -100,7 +100,7 @@ Then update your `jest.config.js` or `package.json` as follows:
"jest-junit",
{
"outputDirectory":"reports",
"outputName":"unit_test_report.xml"
"outputName":"node-test.xunit.xml"
}
]
]
@@ -108,9 +108,9 @@ Then update your `jest.config.js` or `package.json` as follows:
},
```
##### Sonar report
##### SonarQube report
By default Jest doesn't generate any test report supported by Sonar. To do so you need to use the [jest-sonar](https://www.npmjs.com/package/jest-sonar) package.
By default Jest doesn't generate any test report supported by SonarQube. To do so, you need to use the [jest-sonar](https://www.npmjs.com/package/jest-sonar) package.
Add the package as a development dependency:
@@ -129,14 +129,14 @@ Then update your `jest.config.js` or `package.json` as follows:
"jest-junit",
{
"outputDirectory":"reports",
"outputName":"unit_test_report.xml"
"outputName":"node-test.xunit.xml"
}
],
[
"jest-sonar",
{
"outputDirectory":"reports",
"outputName":"sonar_test_report.xml"
"outputName":"node-test.sonar.xml"
}
]
],
@@ -168,7 +168,7 @@ Then update your `package.json` as follows:
}
```
##### Junit report
##### JUnit report
By default Mocha doesn't generate any test report supported by GitLab. To do so you need to use the [mocha-junit-reporter](https://www.npmjs.com/package/mocha-junit-reporter) package.
@@ -183,11 +183,11 @@ Then update your `package.json` as follows: