fix(test): stop hardcoding the declared @loopover/engine dependency range#7130
Merged
Merged
Conversation
…ange buildEngineVersionDisplay's regression test hardcoded its expected fallback as the literal string "^3.0.0" -- read live from packages/loopover-miner/package.json instead, so a real release bump (confirmed live: the linked-versions release group, #7123, bumped it to ^3.2.1 and broke this) can never silently make the test assert the wrong value again.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7130 +/- ##
=======================================
Coverage 93.75% 93.75%
=======================================
Files 692 692
Lines 68818 68818
Branches 18781 18781
=======================================
Hits 64521 64521
Misses 3302 3302
Partials 995 995
Flags with carried forward coverage won't be shown. Click here to find out more. |
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
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.
Summary
buildEngineVersionDisplay's regression test intest/unit/miner-status.test.tshardcoded its expected fallback value as the literal string"^3.0.0"-- read live frompackages/loopover-miner/package.json's actualdependencies["@loopover/engine"]instead (the exact same sourcebuildEngineVersionDisplay's own fallback path reads), so a real release bump can never silently make the test assert the wrong value again.Confirmed live: the
linked-versionsrelease group (#7123) correctly bumpedpackages/loopover-miner/package.json's@loopover/enginedependency to^3.2.1, which broke this hardcoded assertion on PR #7127 (already manually patched to unblock that PR; this is the durable fix).Test plan
npx vitest run test/unit/miner-status.test.ts-- 33/33 passnpm run typecheck-- clean