The coverage tree traversal checked `tree[key].file` to detect file entries. When a directory named "file" contained a file also named "file", this check incorrectly matched the child entry instead of file metadata, causing a TypeError when accessing `.path`. Check for `.file?.path` instead to correctly identify file metadata. Fixes: https://github.com/nodejs/node/issues/61080 PR-URL: https://github.com/nodejs/node/pull/61169 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> |
||
|---|---|---|
| .. | ||
| aborts | ||
| concurrency | ||
| coverage | ||
| coverage-default-exclusion | ||
| coverage-file-name | ||
| coverage-loader | ||
| coverage-snap | ||
| coverage-with-mock | ||
| custom_reporters | ||
| cwd | ||
| default-behavior | ||
| error-reporter-fail-fast | ||
| flag-propagation | ||
| global-setup-teardown | ||
| issue-54726 | ||
| matching-patterns | ||
| no-isolation | ||
| node_modules | ||
| options-propagation | ||
| output | ||
| plan | ||
| shards | ||
| snapshots | ||
| source-maps | ||
| async-error-in-test-hook.mjs | ||
| coverage.js | ||
| extraneous_set_immediate_async.mjs | ||
| extraneous_set_timeout_async.mjs | ||
| index.js | ||
| invalid-tap.js | ||
| mock-nm.js | ||
| nested.js | ||
| never_ending_async.js | ||
| never_ending_sync.js | ||
| print-arguments.js | ||
| protoMutation.js | ||
| recursive_run.js | ||
| reporters.js | ||
| rerun.js | ||
| root-duration.mjs | ||
| run_inspect.js | ||
| run_inspect_assert.js | ||
| test-runner-global-hooks.mjs | ||
| test_only.js | ||
| throws_sync_and_async.js | ||
| todo_exit_code.js | ||
| user-logs.js | ||