Skip to content

fix: report TAP timeouts without crashing - #3471

Open
tianrking wants to merge 1 commit into
avajs:mainfrom
tianrking:agent/fix-tap-timeout-reporting
Open

fix: report TAP timeouts without crashing#3471
tianrking wants to merge 1 commit into
avajs:mainfrom
tianrking:agent/fix-tap-timeout-reporting

Conversation

@tianrking

Copy link
Copy Markdown

Summary

  • serialize the synthetic global-timeout error before the TAP reporter formats it
  • add regression coverage for a timed-out test file and TAP snapshots for supported Node 22, 24, and 26

Root cause

writeTimeout() created a native Error and passed it directly to dumpError(), which expects AVA's serialized error record. The raw error has no originalError, so the formatter throws while assigning its stack and the reporter surfaces an AggregateError.

Fixes #3461

Validation

  • npx tap test-tap/reporters/tap.js (Node 24; 6 subtests passed)
  • the same reporter test run with temporary Node 22.23.1 and Node 26.5.0 while generating the required versioned snapshots
  • npx xo lib/reporters/tap.js test-tap/reporters/tap.js
  • git diff --check

npm test invokes a Bash script that cannot run under this Windows PowerShell checkout; the available WSL distribution has no Node runtime. A direct full lint/typecheck also exposes existing fixture/symlink resolution failures outside this change, while the affected reporter test and target lint pass.

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.

Timeouts with TAP reporter result in AggregateError

1 participant