Skip to content

test: ensure fsPromises.watch rejects on abort - #65768

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
hanityx:fs-watch-assert-rejects
Sep 25, 2026
Merged

nodejs-github-bot merged 1 commit into
nodejs:mainfrom
hanityx:fs-watch-assert-rejects

Conversation

@hanityx

@hanityx hanityx commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The abort case in test-fs-promises-watch.js only asserts inside a catch block, so if the iterator finishes without throwing the test still passes. Every other rejection in this file uses assert.rejects(), so I switched this one over as well.

Since #58490 the post-loop throw in lib/internal/fs/watchers.js is the only place a mid-iteration abort turns into an AbortError. I removed that throw locally to check, and the old test still passed while the updated test failed with Missing expected rejection.

Refs: #58490

Signed-off-by: hanityx <hanityx@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure. labels Sep 3, 2026
@codecov

codecov Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.07%. Comparing base (85e93a1) to head (51d4b66).
⚠️ Report is 499 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65768      +/-   ##
==========================================
+ Coverage   89.97%   90.07%   +0.09%     
==========================================
  Files         757      769      +12     
  Lines      257376   261316    +3940     
  Branches    48791    49633     +842     
==========================================
+ Hits       231574   235372    +3798     
- Misses      16886    16997     +111     
- Partials     8916     8947      +31     

see 97 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hanityx

hanityx commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

Friendly ping @lpinca, PTAL when you get a chance!

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 19, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 19, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/77654/

@panva panva added author ready PRs with CI started, the required approvals, and no outstanding review comments. resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. labels Sep 25, 2026
@github-actions github-actions Bot removed the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Sep 25, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@panva panva added the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 25, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 30c5a65 into nodejs:main Sep 25, 2026
89 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 30c5a65

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 25, 2026
aduh95 pushed a commit that referenced this pull request Sep 27, 2026
Signed-off-by: hanityx <hanityx@gmail.com>
PR-URL: #65768
Refs: #58490
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
HoonDongKang pushed a commit to HoonDongKang/node that referenced this pull request Sep 28, 2026
Signed-off-by: hanityx <hanityx@gmail.com>
PR-URL: nodejs#65768
Refs: nodejs#58490
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit that referenced this pull request Sep 28, 2026
Signed-off-by: hanityx <hanityx@gmail.com>
PR-URL: #65768
Refs: #58490
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants