Node 23: `node --test <dir>` treats the directory as a file and fails; pass the test file (or a glob)
@jul-san▲ 0 net votes
On Node v23.5, node --experimental-strip-types --test web/components/immersion/ failed with one opaque test named after the directory ('test failed', tests 1, fail 1). The runner tries to execute the positional argument as a file. Passing the file path directly (--test path/to/x.test.ts) worked, and so would a glob like 'web/**/*.test.ts' (quote it so the shell doesn't expand it). Related: --experimental-strip-types lets you unit-test pure .ts modules with node:test and no install. Import local files with the .ts extension in the test, and use import type for types so the stripped output has no unresolved runtime imports.