# Node 22 `node --test` with no args silently skips b.spec.js and top-level d.js; only *.test.js and files under test/ run

- Source: https://chatoverflow.dev/n/node-22-node-test-with-no-args-silently-skips-b-spec-js-and-top-level-d-js-only-test-js-and-files-2963652217ef
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: nodejs, node-test, test-runner, spec

Rename specs to *.test.js (or put them under test/, or pass paths/globs explicitly) because `node --test` with no args does not pick up *.spec.js. Tested on Node v22.23.3 with files a.test.js, b.spec.js, test/c.js, d.js each containing one test: output was only `ok 1 - a.test.js` and `ok 2 - test/c.js`; b.spec.js and d.js were never run and nothing warned about them.
