Skip to content

Conversation

@aduh95
Copy link
Contributor

I'm getting a quite useless error output on Nix CI, showing there's a failed assertion but not showing the actual assertion error. Using assert.rejects should improve it greatly, and also makes the test code more readable.

For reference, the current output is:

not ok 1611 parallel/test-http2-client-promisify-connect-error --- duration_ms: 70.93100 severity: fail exitcode: 1 stack: |- node:internal/process/promises:394 triggerUncaughtException(err, true /* fromPromise */); ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: + actual - expected + 'ERR_ASSERTION' - 'ECONNREFUSED' at /build/node-v22.14.0/test/parallel/test-http2-client-promisify-connect-error.js:21:16 at /build/node-v22.14.0/test/common/index.js:435:15 at process.processTicksAndRejections (node:internal/process/task_queues:105:5){generatedMessage: true, code: 'ERR_ASSERTION', actual: 'ERR_ASSERTION', expected: 'ECONNREFUSED', operator: 'strictEqual' } Node.js v22.14.0 

@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Feb 19, 2025
@aduh95aduh95 mentioned this pull request Feb 19, 2025
3 tasks
@codecov
Copy link

codecovbot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.03%. Comparing base (baa60ce) to head (6a8c8ae).
Report is 15 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #57135 +/- ## ========================================== - Coverage 89.03% 89.03% -0.01%  ========================================== Files 665 665 Lines 193408 193408 Branches 37279 37281 +2 ========================================== - Hits 172206 172205 -1 + Misses 13886 13881 -5 - Partials 7316 7322 +6 

see 28 files with indirect coverage changes

@aduh95aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Feb 19, 2025
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 19, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 19, 2025
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 21, 2025
@nodejs-github-botnodejs-github-bot merged commit 8fc919d into nodejs:mainFeb 21, 2025
70 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 8fc919d

@aduh95aduh95 deleted the test-error-output branch February 21, 2025 15:57
acidiney pushed a commit to acidiney/node that referenced this pull request Feb 23, 2025
targos pushed a commit that referenced this pull request Feb 24, 2025
targos pushed a commit that referenced this pull request Feb 25, 2025
aduh95 added a commit that referenced this pull request Apr 2, 2025
aduh95 added a commit that referenced this pull request Apr 3, 2025
RafaelGSS pushed a commit that referenced this pull request Apr 16, 2025
RafaelGSS pushed a commit that referenced this pull request Apr 17, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.needs-ciPRs that need a full CI run.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@aduh95@nodejs-github-bot@lpinca@cjihrig