Skip to content

Fix test assertions in parse_mcp_gateway_log.test.cjs#14003

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-github-actions-workflow-dee874c1-44b3-4457-b703-20d739964150
Feb 5, 2026
Merged

Fix test assertions in parse_mcp_gateway_log.test.cjs#14003
pelikhan merged 2 commits intomainfrom
copilot/fix-github-actions-workflow-dee874c1-44b3-4457-b703-20d739964150

Conversation

Copy link
Contributor

Copilot AI commented Feb 5, 2026

Test failure in parse_mcp_gateway_log.test.cjs: assertions were checking core.info() output for filenames, but displayFileContent() places filenames in core.startGroup() calls as collapsible group titles.

Changes:

  • Updated test to check allGroups (startGroup calls) instead of allOutput (info calls) for filename assertions
  • Removed redundant filename check that was already covered
// Check files are listed (filenames appear in startGroup calls for files with content)
expect(allGroups).toContain("gateway.log");
expect(allGroups).toContain("stderr.log");
expect(allGroups).toContain("gateway.md");

File content continues to be verified in allOutput as expected.

Original prompt

Fix the failing GitHub Actions workflow js
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 62683146998
Job URL: https://github.com/github/gh-aw/actions/runs/21730354570/job/62683146998


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

The test "prints all files in gateway directories with content" was failing because
it expected filenames to appear in core.info() output. However, the displayFileContent()
function places filenames in core.startGroup() calls (as group titles) for files with
displayable content, not in core.info() calls.

Fixed by updating the test to check allGroups (startGroup calls) instead of allOutput
(info calls) for filenames, which correctly reflects the actual function behavior.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow for JavaScript Fix test assertions in parse_mcp_gateway_log.test.cjs Feb 5, 2026
Copilot AI requested a review from pelikhan February 5, 2026 22:29
@pelikhan pelikhan marked this pull request as ready for review February 5, 2026 22:29
Copilot AI review requested due to automatic review settings February 5, 2026 22:29
@pelikhan pelikhan merged commit 2f5de1f into main Feb 5, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/fix-github-actions-workflow-dee874c1-44b3-4457-b703-20d739964150 branch February 5, 2026 22:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes failing test assertions in parse_mcp_gateway_log.test.cjs by correcting where filename assertions should look. The test was checking allOutput (info calls) for filenames, but the displayFileContent() function actually places filenames in allGroups (startGroup calls) as collapsible group titles.

Changes:

  • Updated test assertions to check allGroups instead of allOutput for filename presence
  • Removed redundant filename check that duplicated an existing assertion
  • Improved test comment clarity to explain why filenames appear in startGroup calls

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants