-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
test(graphs): add tests for Dijkstra, DijkstraSmallestPath, FloydWarshall, KruskalMST, and DFS #1843
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
Open
SamXop123
wants to merge
2
commits into
TheAlgorithms:master
from
SamXop123:test/graphs-add-core-tests
Open
test(graphs): add tests for Dijkstra, DijkstraSmallestPath, FloydWarshall, KruskalMST, and DFS #1843
SamXop123
wants to merge
2
commits into
TheAlgorithms:master
from
SamXop123:test/graphs-add-core-tests
Conversation
This file contains hidden or 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
...hall, KruskalMST, and DFS
@SamXop123
SamXop123
requested review from
appgurueu and
raklaptudirm
as code owners
October 15, 2025 15:21
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.90%. Comparing base (08d8c6b) to head (db2f3ff).
Additional details and impacted files
@@ Coverage Diff @@ ## master #1843 +/- ## ========================================== + Coverage 85.91% 87.90% +1.98% ========================================== Files 379 379 Lines 19778 19778 Branches 3015 3079 +64 ========================================== + Hits 16993 17386 +393 + Misses 2785 2392 -393
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
Title
test(graphs): add tests for Dijkstra, DijkstraSmallestPath, FloydWarshall, KruskalMST, and DFS
Description
What’s added
distproperty and validates path sequences via spread.Infinityhandling).Why
CONTRIBUTING.mdguidance to "write proper tests."How to run
npm ci npm test -- GraphsChanges
No algorithm implementations or configs were modified.
Notes
DijkstraSmallestPathconstructs path arrays that also carry adistproperty (e.g.,['B', dist: 1]). Tests assertdistseparately (e.g.,res.B.dist) and compare the path sequence using spread (e.g.,expect([...res.B])).Checklist
CONTRIBUTING.md.Summary