test_runner: restore directory search for --test · nodejs/node@1ad7ca3 · GitHub
Skip to content

Commit 1ad7ca3

Browse files
bitpshraduh95
authored andcommitted
test_runner: restore directory search for --test
Passing a directory to `node --test` (e.g. `node --test tests`) matched the directory itself as a glob pattern and then tried to run it as a test file, failing with MODULE_NOT_FOUND. Before glob patterns were supported, a directory argument was searched for test files within it. Expand a pattern that resolves to a directory into a search for the default test files inside it. Despite the report framing this as Windows-only, it reproduces on every platform: it is a plain regression from when directory arguments stopped being searched. Fixes: #64555 Signed-off-by: Paul Bouchon <mail@bitpshr.net> PR-URL: #64637 Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent 101a215 commit 1ad7ca3

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

lib/internal/test_runner/runner.js

Lines changed: 19 additions & 0 deletions

test/parallel/test-runner-cli.js

Lines changed: 21 additions & 0 deletions

0 commit comments

Comments
 (0)