Skip to content

test: omit stack traces from snapshots - #401

Merged
parkerbxyz merged 2 commits into
mainfrom
parkerbxyz-omit-stack-traces-from-test-snapshots
Oct 12, 2026
Merged

parkerbxyz merged 2 commits into
mainfrom
parkerbxyz-omit-stack-traces-from-test-snapshots

Conversation

@parkerbxyz

Copy link
Copy Markdown
Contributor

The integration check fails on main because 10 snapshots include Node.js internal stack frames, and their names changed between Node.js versions. CI installs the latest Node.js that matches >=24.4.0, so these snapshots can break without any change to the action.

This PR runs each test with --stack-trace-limit=0, so error output no longer includes stack traces. Snapshots still capture the error message, any HTTP error details, and the ::error:: output users see. Code coverage is still enforced by c8 --100.

Without stack traces, normalizeStderr is no longer needed, so this removes it.

All 120 tests pass with 100% coverage on Node.js 24 and 26.

parkerbxyz and others added 2 commits October 12, 2026 15:26
Run each test with `--stack-trace-limit=0` so error output no longer
includes stack traces. Node.js internal frames changed between
versions, which broke 10 snapshots without any change to the action.
Without stack traces, the path, line, and color normalization is no
longer needed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b91f96b7-a7f3-4ff3-8f52-3a617307ede2
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b91f96b7-a7f3-4ff3-8f52-3a617307ede2
@parkerbxyz
parkerbxyz requested a review from a team as a code owner October 12, 2026 22:33
Copilot AI balanced review requested due to automatic review settings October 12, 2026 22:33
@parkerbxyz parkerbxyz self-assigned this Oct 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused changes correctly remove version-sensitive stack frames without weakening error-output or coverage checks.

0 open findings

What changed in this PR

Stabilizes integration snapshots across supported Node.js versions by omitting stack traces while preserving error details.

Changes:

  • Runs test processes with --stack-trace-limit=0.
  • Removes obsolete stderr normalization and updates affected snapshots.
File Description
tests/​index.js Disables stack traces in test subprocesses.
tests/​index.js.snapshot Updates expected stderr output.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@parkerbxyz
parkerbxyz enabled auto-merge (squash) October 12, 2026 22:35
@parkerbxyz
parkerbxyz disabled auto-merge October 12, 2026 22:35
@parkerbxyz
parkerbxyz merged commit e85f677 into main Oct 12, 2026
8 checks passed
@parkerbxyz
parkerbxyz deleted the parkerbxyz-omit-stack-traces-from-test-snapshots branch October 12, 2026 22:35
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