My sonar propertites:
{SONAR_DIR}/bin/sonar-scanner -X -Dsonar.host.url={HOST_URL}
-Dsonar.login={SONAR_TOKEN}\
-Dsonar.projectKey={PROJECT_NAME}
-Dsonar.sourceEncoding=UTF-8
-Dsonar.sources={SOURCE} \
-Dsonar.tests={SOURCE}
-Dsonar.test.inclusions=/*.spec.ts,/.spec.tsx,**/.spec.js
-Dsonar.testExecutionReportPaths=test-report.xml
-Dsonar.typescript.lcov.reportPaths=coverage/lcov.info
-Dsonar.exclusions=/node_modules/,/mocks/ \
But I got this error
00:14:28.700 INFO: Sensor TypeScript analysis [javascript] (done) | time=23320ms
00:14:28.700 INFO: Sensor JavaXmlSensor [java]
00:14:28.704 INFO: Sensor JavaXmlSensor [java] (done) | time=4ms
00:14:28.704 INFO: Sensor HTML [web]
00:14:28.708 INFO: Sensor HTML [web] (done) | time=4ms
00:14:28.708 INFO: Sensor SonarTS [typescript]
00:14:28.708 INFO: Since SonarTS v2.0, TypeScript analysis is performed by SonarJS analyzer v6.0 or later. No TypeScript analysis is performed by SonarTS.
00:14:28.708 INFO: Sensor SonarTS [typescript] (done) | time=0ms
00:14:28.708 INFO: Sensor Generic Test Executions Report
00:14:28.708 INFO: Parsing /mnt/ramdisk/project/test-report.xml
00:14:28.741 INFO: Imported test execution data for 100 files
00:14:28.741 INFO: Test execution data ignored for 81 unknown files, including:
/mnt/ramdisk/project/src/lib/components/Icons/__test__/Icons.spec.js
/mnt/ramdisk/project/src/lib/components/InputShipper/__test__/InputShipper.spec.tsx
/mnt/ramdisk/project/src/lib/actions/__tests__/shippers.spec.js
/mnt/ramdisk/project/src/lib/components/InputGroup/InputGroup.spec.tsx
/mnt/ramdisk/project/src/lib/services/__test__/helpers.spec.js
00:14:28.741 INFO: Sensor Generic Test Executions Report (done) | time=33ms
00:14:28.744 INFO: ------------- Run sensors on project
00:14:28.747 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
00:14:28.747 DEBUG: 'Java CPD Block Indexer' skipped because there is no related file in current project
00:14:28.747 DEBUG: Sensors : Zero Coverage Sensor
00:14:28.747 INFO: Sensor Zero Coverage Sensor
00:14:28.789 INFO: Sensor Zero Coverage Sensor (done) | time=42ms
in my XML file (actually it was generated by jest-sonar-reporter)
<?xml version="1.0" encoding="UTF-8"?>
<testExecutions version="1">
<file path="/Users/reywang/Documents/nexttrucking/depot/src/apps/trips/components/ChassisModal/__test__/ChassisModal.spec.tsx">
<testCase name="ChassisModal When modal is link chassis Should render component with expected value" duration="228"/>
<testCase name="ChassisModal When modal is link chassis Should render error message when input value error" duration="175"/>
<testCase name="ChassisModal When modal is link chassis Should render search result when chassis number has 4 letters and 5 numbers" duration="90"/>
<testCase name="ChassisModal When modal is link chassis Should render information wrap when clicking search button with existing chassis number" duration="65"/>
<testCase name="ChassisModal When modal is link chassis Should render no data wrap when clicking search button with un-existing chassis number" duration="64"/>
<testCase name="ChassisModal When modal is register chassis Should render component with expected value" duration="112"/>
<testCase name="ChassisModal when modal is edit chassis Should render component with expected value" duration="105"/>
<testCase name="ChassisModal when modal is edit chassis Should render error message with missing information" duration="89"/>
</file>
<file path="/Users/reywang/Documents/nexttrucking/depot/src/apps/trips/pages/ConfirmContainerOrderPage/ConfirmContainerOrderPage.spec.tsx">
<testCase name="ConfirmContainerOrderPage visual tests should have the page title" duration="252"/>
<testCase name="ConfirmContainerOrderPage visual tests should have the correct sections" duration="146"/>
<testCase name="ConfirmContainerOrderPage visual tests should have the correct fields and values for the Order section" duration="153"/>
<testCase name="ConfirmContainerOrderPage visual tests should have the correct fields and values for the Container section" duration="148"/>
<testCase name="ConfirmContainerOrderPage visual tests should have the correct fields and values for the Route section" duration="116"/>
<testCase name="ConfirmContainerOrderPage redirect tests should redirect to create shipment page when the form has not been started" duration="91"/>
<testCase name="ConfirmContainerOrderPage redirect tests should redirect to create shipment page when the form is not validated" duration="99"/>
<testCase name="ConfirmContainerOrderPage redirect tests should not redirect to create shipment page when the form is started AND validated" duration="97"/>
<testCase name="ConfirmContainerOrderPage button tests should have the correct buttons" duration="109"/>
<testCase name="ConfirmContainerOrderPage button tests should go to the previous page when the Back button is clicked" duration="99"/>
<testCase name="ConfirmContainerOrderPage button tests should go to the orders page when the Cancel button is clicked" duration="133"/>
<testCase name="ConfirmContainerOrderPage button tests should save the shipment and go to the order detail page when the Create button is clicked" duration="78"/>
</file>
</testExecutions>