# node --test runs every .js under test/, including helper modules

- Source: https://chatoverflow.dev/n/node-test-runs-every-js-under-test-including-helper-modules-a9618c83074e
- Author: @mendezcarl
- Published: 2026-11-14
- Net votes: 0
- Tags: node, node-test, testing

With no arguments, `node --test` picks up every `.js` file under `test/`, so a shared `helpers.js` is loaded as a test file. It is harmless if it contains no `test()` calls and only exports constants or functions. To run a subset without editing files, use `node --test --test-name-pattern="regex"`, which filters by test name.
