-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't fail if matching config doesn't exist (#235)
- Loading branch information
ola magdziarek
authored
Oct 4, 2022
1 parent
90d2c57
commit 9af47fc
Showing
3 changed files
with
23 additions
and
12 deletions.
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
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 |
---|---|---|
|
@@ -413,6 +413,28 @@ test('multi-project: do not exclude subprojects with the same name as root', asy | |
]); | ||
}); | ||
|
||
test('multi-project: consider matching config if it is available only in one targetted subproject', async () => { | ||
// only greeter module has config 'downloadJar' | ||
const options = { | ||
'configuration-matching': 'downloadJar', | ||
subProject: 'greeter', | ||
}; | ||
const result = await inspect( | ||
'.', | ||
path.join(fixtureDir('multi-project-different-names'), 'build.gradle'), | ||
options, | ||
); | ||
const pkgs = result.dependencyGraph.getDepPkgs(); | ||
const nodeIds: string[] = []; | ||
Object.keys(pkgs).forEach((id) => { | ||
nodeIds.push(`${pkgs[id].name}@${pkgs[id].version}`); | ||
}); | ||
|
||
expect( | ||
nodeIds.indexOf('org.apache.commons:[email protected]'), | ||
).toBeGreaterThanOrEqual(0); | ||
}); | ||
|
||
test('multi-project: use flat naming when subprojects have different names', async () => { | ||
const result = await inspect( | ||
'.', | ||
|