Files
shop/tests/unit/support/register.mjs
T
libretech fccff147ba
build / test (push) Successful in 10s
build / build (push) Successful in 1m5s
v0.1.2: checkout fixes for CMS v0.2.0 (#18)
Co-authored-by: Michael Czechowski <mail@librete.ch>
2026-10-15 10:23:27 +02:00

7 lines
468 B
JavaScript

// Loaded by `npm test` through `node --import`. Node runs the .ts sources directly (type stripping), but unlike Vite and Nitro it does
// not resolve extensionless relative imports such as `import { … } from "./cmsError"` in a server/utils module.
// The hook below retries such an import from a .ts file with ".ts" appended. Test files import sources with explicit .ts paths.
import { register } from "node:module";
register("./resolve-ts.mjs", import.meta.url);