-
Notifications
You must be signed in to change notification settings - Fork 115
Add assertions to IsDependencyOfExplicitlyReferencedComponents test calls #1618
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
Add assertions to IsDependencyOfExplicitlyReferencedComponents test calls #1618
Conversation
…in circular dependency test Co-authored-by: RushabhBhansali <24465841+RushabhBhansali@users.noreply.github.com>
|
👋 Hi! It looks like you modified some files in the
If none of the above scenarios apply, feel free to ignore this comment 🙂 |
cb55fcf
into
users/rbhansali/fix-npm-transitive-dependency
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## users/rbhansali/fix-npm-transitive-dependency #1618 +/- ##
=============================================================================
Coverage 90.1% 90.1%
=============================================================================
Files 435 435
Lines 37556 37556
Branches 2312 2311 -1
=============================================================================
+ Hits 33861 33863 +2
Misses 3219 3219
+ Partials 476 474 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* Fix depedency duplication logic. Avoid duplicate parent-dependency pairs only. * added test * circular dependency test * removed redundant file * updated detector version * Add assertions to IsDependencyOfExplicitlyReferencedComponents test calls (#1618) * Initial plan * Add assertions to IsDependencyOfExplicitlyReferencedComponents calls in circular dependency test Co-authored-by: RushabhBhansali <24465841+RushabhBhansali@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: RushabhBhansali <24465841+RushabhBhansali@users.noreply.github.com> Co-authored-by: Rushabh <rbhansali@microsoft.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: RushabhBhansali <24465841+RushabhBhansali@users.noreply.github.com>
Addresses feedback from #1617 (comment)
Changes
The circular dependency test called
IsDependencyOfExplicitlyReferencedComponentstwice without asserting the boolean return values, allowing the test to pass even when dependency relationships were incorrectly recorded.Added
.Should().BeTrue()assertions to both calls. Corrected the second assertion to check component C against explicitly-referenced component A (not transitive component B):The method validates that a component is a dependency of an explicitly referenced component. Only A is explicitly referenced in package.json, so both B and C must be validated against A.
New Detector Checklist
IDefaultOffComponentDetector💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.