| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
The test-only changes accurately reflect the function signature and expected call behavior.
Review effort: Balanced
Findings: None
Corrects getCommitOid test stubs so getRef tests exercise the intended branches.
Changes:
| File | Description |
|---|---|
| src/git-utils.test.ts | Corrects and strengthens getCommitOid stubbing and assertions. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Copilot noted in #4148 (comment) that most of the stubs for getCommitOid weren't correctly set up: the broken stubs assumed that getCommitOid only had one parameter for the ref, while it actually has two for checkoutPath and ref. This meant that calls to the stubbed getCommitOid weren't working as intended and always received undefined.
This PR updates the tests to stub getCommitOid correctly so that the tests work as intended. It also adds test assertions to verify that getCommitOid is called the expected number of times and with the expected arguments.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Changes are for tests only and will not be released.
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist