Sonar.coverage.exclusions regex doesn't work

Can anyone explain to me the sonar.coverage.exclusions regex?

We currently have our latest attempt at removing coverage like this, and it still doesn’t work. All test files are still included in coverage.

sonar.coverage.exclusions=**/__test__/*,**/__mocks__/*,**/*.test.(ts|js|jsx|tsx)

Syntax like this won’t work. You’ll need to exclude:

**/*.test.ts,**/*.test.js,**/*.test.jsx,**/*.test.tsx*

Thanks for the explanation Colin that helped clear some things up. For nested directories would **/__test__/** remove coverage from all files in the __test__ directory?

Yes, it should.