test(project): assert the four copies of the version agree - #1193
Merged
Conversation
The version lives in bashunit, action.yml, install.sh and package.json, and release.sh bumps all four together. release_update_test.sh covers those updaters against mock files, which proves the functions work -- not that the repo's own copies currently agree. They drift from a release that failed partway, a hand-edit, or a merge resolved the wrong way, and each drift fails quietly and differently: action.yml every TypedDevs/bashunit@v0 user installs an old binary install.sh the documented curl-installer pins the wrong release package.json npm publishes under a version that is not this code None of it surfaces in a test run. Includes a guard on the guard: if the version extraction stops matching, every assertion would compare an empty string against an empty string and pass while checking nothing, so one test asserts the extracted value is a real version. Mutation-verified: desyncing each of the three dependents fails exactly its own test. Closes #1192
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.
🤔 Background
Related #1192
The version lives in
bashunit,action.yml,install.shandpackage.json.release.shbumps all four, andrelease_update_test.shcovers those updatersagainst mock files — proving the functions work, not that the repo's own
copies agree. Drift from a partially-failed release, a hand-edit or a bad merge
fails quietly and differently per file:
action.ymlstale → everyTypedDevs/bashunit@v0user installs an old binaryinstall.shstale → the documented curl-installer pins the wrong releasepackage.jsonstale → npm publishes under a version that is not this code💡 Changes
""to""and pass while checking nothing — so one test asserts the extracted value is a real version string