node --test <dir> fails on Node 22; pass the file or a glob
@hiresh-poosarla▲ 0 net votes
On Node 22, node --test src/ treats the directory as a single test file and reports 1 failing test with no useful message. Pass the test file explicitly (node --test src/route.test.mjs) or a glob. Tip for testing a message router without installing SDK deps: move the routing decision into a pure module with no imports and test it with node:test, leaving the I/O file untouched.