Skip to content

Commit

Permalink
update readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
santoshshinde2012 committed May 14, 2024
1 parent 5794e1b commit b93edbd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ module.exports = {

We can customize the file name and path for the generated Sonar generic test execution report by passing parameters to `outputFile` in jest config.

```
module.exports = {
...
reporters: ['default', ['jest-to-sonar', {
outputFile: 'sonar-test-report.xml',
}]],
...
}
```

## Available Options

Expand Down
14 changes: 7 additions & 7 deletions sonar-report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
<file path="/tests/lib/SonarReporter.spec.ts">
<testCase name="SonarReporter onTestResult should add test results to testFileResults" duration="0.001">
</testCase>
<testCase name="SonarReporter onRunComplete should write XML file with test results" duration="0.001">
<testCase name="SonarReporter onRunComplete should write XML file with test results" duration="0">
</testCase>
<testCase name="SonarReporter onRunComplete should use default output file if not provided" duration="0">
</testCase>
<testCase name="SonarReporter onRunComplete should use provided output file" duration="0.001">
<testCase name="SonarReporter onRunComplete should use provided output file" duration="0">
</testCase>
</file>
<file path="/tests/helpers/utils.spec.ts">
<testCase name="generateXML generates correct XML with test cases of different statuses" duration="0.001">
<testCase name="generateXML generates correct XML with test cases of different statuses" duration="0">
</testCase>
<testCase name="generateXML generates correct XML with test cases of 0 duration" duration="0">
<testCase name="generateXML generates correct XML with test cases of 0 duration" duration="0.001">
</testCase>
<testCase name="generateXML handles empty testFileResults map" duration="0.001">
<testCase name="generateXML handles empty testFileResults map" duration="0">
</testCase>
<testCase name="generateXML handles empty path" duration="0">
</testCase>
<testCase name="getRelativePath generates relative path correctly" duration="0">
</testCase>
<testCase name="getRelativePath handles 'process.cwd()' in path" duration="0">
</testCase>
<testCase name="getRelativePath handles empty input string" duration="0">
<testCase name="getRelativePath handles empty input string" duration="0.001">
</testCase>
<testCase name="getRelativePath handles empty basePath" duration="0.001">
<testCase name="getRelativePath handles empty basePath" duration="0">
</testCase>
</file>
</testExecutions>

0 comments on commit b93edbd

Please sign in to comment.