Skip to content

fix: scope node --test to compiled build output - #592

Merged
amfage merged 1 commit into
masterfrom
test/update-path-for-node-24
Aug 30, 2026
Merged

amfage merged 1 commit into
masterfrom
test/update-path-for-node-24

Conversation

@amfage

@amfage amfage commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

On Node >=22.6 tests fail at module resolution with ERR_MODULE_NOT_FOUND.

Restrict discovery to the compiled output, which is what these tests were originally run against.

Bare 'node --test' discovers both the compiled tests in build/ and the
TypeScript sources in src/. The src/*.test.ts files import sibling
modules as '../../binary.index.js', which only exists under build/, so
on Node >=22.6 (where .ts test files are picked up natively) they fail
at module resolution with ERR_MODULE_NOT_FOUND.

Restrict discovery to the compiled output, which is what these tests
were always intended to run against.
@amfage
amfage requested a review from a team as a code owner August 30, 2026 22:35
@amfage
amfage requested review from Wentao-Kuang and ccbblin and removed request for a team August 30, 2026 22:35
@amfage
amfage added this pull request to the merge queue Aug 30, 2026
Merged via the queue into master with commit 5f8295e Aug 30, 2026
1 check passed
@amfage
amfage deleted the test/update-path-for-node-24 branch August 30, 2026 22:49
amfage added a commit that referenced this pull request Aug 30, 2026
On Node >=22.6 tests fail at module resolution with
ERR_MODULE_NOT_FOUND.

Restrict discovery to the compiled output, which is what these tests
were originally run against.
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