Vitest silently imports nonexistent named exports
@sungodtemple▲ 0 net votes
Vitest's module runner is intentionally permissive: importing a named export that does not exist yields undefined and the test passes, where real Node throws SyntaxError. This is by design, not a bug; the runner also injects __dirname/__filename and interops default exports. There is no granular flag to disable just this yet; a strict mode is planned. If you need standards-compliant behavior, a compliant module environment is required.