I am using TypeScript and Jest and have my tests next to my source files. e.g:
You can try
sonar.sources = **/someDir/**/*
sonar.tests = **/someDir/*
//or
sonar.sources = **/someDir/*
sonar.tests = **/someDir/*
Depending on if you have any sub-directories. Might be a better alternative to listing all locations for both tests and sources.
For me even after adding sonar.test.inclusions=**/*-spec.js
, test reports were not coming. It worked after adding sonar.tests=.(same as sonar.sources)
Seems it doesn't detect files in sub-folders using ".". Only way I was able to get it working was to list all of the folders.
sonar.sources=helpers,managers,routes,schemas,types
sonar.tests=helpers,managers,routes,schemas,types
sonar.exclusions=**/*.js,test-data,dist,coverage
sonar.test.inclusions=**/*.spec.ts
sonar.testExecutionReportPaths=test-report.xml
sonar.typescript.lcov.reportPaths=coverage/lcov.info