Skip to content

test: 💍 harden test to work on Windows#1264

Merged
streamich merged 1 commit into
masterfrom
test-fixes
Jul 7, 2026
Merged

test: 💍 harden test to work on Windows#1264
streamich merged 1 commit into
masterfrom
test-fixes

Conversation

@streamich

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 7, 2026 11:39
@streamich streamich merged commit 27627f2 into master Jul 7, 2026
10 checks passed
@streamich streamich deleted the test-fixes branch July 7, 2026 11:41

Copilot AI left a comment

Copy link
Copy Markdown

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 adjusts Volume.watch() tests around throwIfNoEntry: false to better reflect platform-specific path traversal behavior (Windows vs POSIX) and to ensure non-ENOENT errors still surface.

Changes:

  • Updates the “suppresses only ENOENT” test to use a permission-denied scenario (EACCES) instead of a normal existing file.
  • Splits traversal-through-file behavior into explicit POSIX (ENOTDIR) vs Windows (ENOENT suppressed) test cases.
  • Adds a Windows-specific test asserting that the watcher is returned (and can be closed) when traversal reports ENOENT.

Comment on lines +1646 to +1648
const vol = Volume.fromJSON({ '/file.txt': 'x' }, undefined, {
process: { ...process, platform: 'linux' },
});
Comment on lines +1653 to +1655
const vol = Volume.fromJSON({ '/file.txt': 'x' }, undefined, {
process: { ...process, platform: 'win32' },
});
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