This repository has been archived by the owner on Mar 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: filter Sonar config "sources" list to only include directories t…
…hat exist
- Loading branch information
1 parent
855d597
commit 217e40e
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const { getConfiguration } = require('@nsf-open/ember-cli-sonarqube/lib/configuration'); | ||
const { getSonarConfiguration } = require('@nsf-open/ember-cli-sonarqube/lib/report-metrics'); | ||
const { getTestPackage } = require('./test-helpers'); | ||
|
||
|
||
describe('getSonarConfiguration', function () { | ||
const testPackage = getTestPackage('my-addon'); | ||
|
||
afterEach(function () { | ||
jest.resetModules(); | ||
return testPackage.reset(); | ||
}); | ||
|
||
it('filters the sources list to only directories that exist', function () { | ||
const cliConfig = getConfiguration(testPackage.toPath(), { 'dry-run': true }); | ||
const sonarConfig = getSonarConfiguration(cliConfig); | ||
|
||
expect(sonarConfig.options['sonar.sources']).toEqual('addon'); | ||
}); | ||
}); |