fix: align qmd_index test assertion with ERR_CONFIG error message prefix#22671
Merged
fix: align qmd_index test assertion with ERR_CONFIG error message prefix#22671
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/3a5a7c5e-a2da-4e3a-8aba-17d05114be00
Copilot
AI
changed the title
[WIP] Fix tests or compiled code
fix: align qmd_index test assertion with ERR_CONFIG error message prefix
Mar 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns the qmd_index unit test with the production error formatting, which prefixes configuration errors with ERR_CONFIG:.
Changes:
- Updated the missing-config assertion in
qmd_index.test.cjsto include theERR_CONFIG:prefix.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| it("fails when QMD_CONFIG_JSON is not set", async () => { | ||
| await runMain(undefined); | ||
| expect(mockCore.setFailed).toHaveBeenCalledWith("QMD_CONFIG_JSON environment variable not set"); | ||
| expect(mockCore.setFailed).toHaveBeenCalledWith("ERR_CONFIG: QMD_CONFIG_JSON environment variable not set"); |
There was a problem hiding this comment.
This assertion hard-codes the error code prefix string. To keep tests aligned with the central source of truth (and consistent with other tests in this repo), import ERR_CONFIG from ./error_codes.cjs and build the expected message using that constant (e.g., ${ERR_CONFIG}: ...).
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.
Test was asserting the bare error message while production code prefixes all config errors with
ERR_CONFIG:viaerror_codes.cjs.Change
qmd_index.test.cjs: updated exact-match assertion to include theERR_CONFIG:prefix📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.