Skip to content

test: pin Module.prototype.load registration on the disposable prototype

90334a8
Select commit
Loading
Failed to load commit list.
Open

Add Module.prototype.load for new Module() instances #29256

test: pin Module.prototype.load registration on the disposable prototype
90334a8
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 13, 2026 in 29m 19s

Code review found 1 potential issue

Found 3 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/regression/issue/29253.test.ts:80-87 Missing __dirname assertion leaves this.path = dirname uncovered

Annotations

Check warning on line 87 in test/regression/issue/29253.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Missing __dirname assertion leaves this.path = dirname uncovered

The second subprocess test exports `dirname: __dirname` from target.js but the assertion block never checks `result.exports.dirname`, leaving `this.path = dirname` in `modulePrototypeLoad` completely uncovered. Because every test constructs `new Module(target, module)` with the same path passed to `m.load(target)`, the C++ constructor already initializes `this.path` correctly before `load()` runs, so removing `this.path = dirname` from `modulePrototypeLoad` would leave all 5 tests green while si