-
Notifications
You must be signed in to change notification settings - Fork 326
test: Improve analysis of multiple definition files #10176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c09119c
to
4bf5c63
Compare
a6a3659
to
ba0c59b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10176 +/- ##
=========================================
Coverage 69.62% 69.62%
- Complexity 1460 1461 +1
=========================================
Files 271 271
Lines 9747 9747
Branches 1031 1031
=========================================
Hits 6786 6786
Misses 2506 2506
Partials 455 455
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -54,7 +54,7 @@ class YarnFunTest : StringSpec({ | |||
val definitionFile = getAssetFile("projects/synthetic/yarn/workspaces/package.json") | |||
val expectedResultFile = getAssetFile("projects/synthetic/yarn/workspaces-expected-output.yml") | |||
|
|||
val result = YarnFactory.create().collateMultipleProjects(definitionFile).withResolvedScopes() | |||
val result = analyze(definitionFile.parentFile, packageManagers = setOf(YarnFactory())).getAnalyzerResult() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more places in the code base that call the combination of create()
/ collateMultipleProjects()
/ withResolvedScopes()
(e.g. Yarn2FunTest
, TychoFunTest
). Can we make use of the function there as well?
The test cares only about the analyzer result. So, use only that as expected result instead of the entire `OrtResult`. Signed-off-by: Frank Viernau <[email protected]>
ba0c59b
to
953c6e6
Compare
953c6e6
to
96555a1
Compare
96555a1
to
3e3883e
Compare
3e3883e
to
c76aec0
Compare
The recent change for |
Prepare for an upcoming change. Signed-off-by: Frank Viernau <[email protected]>
Remove the assumption how the mapping of the definitions files is made to make the test more resilient to code changes and to also make it cover the mapping of the definition files. Signed-off-by: Frank Viernau <[email protected]>
Signed-off-by: Frank Viernau <[email protected]>
c76aec0
to
e72ae9c
Compare
I ended up making it an additional parameter. |
See individual commits.