morse-code / vitest.config.js
RemiFabre
feat: initial Reachy Mini Morse Code app
843a4b2
Raw
History Blame Contribute Delete
632 Bytes
import { defineConfig } from "vitest/config";
import { fileURLToPath } from "node:url";
// Stub the SDK animation wrapper in unit tests: Node's ESM loader can't
// resolve `https:` imports, and the unit suite never touches the live SDK.
// Production loads the real wrapper from jsDelivr.
const animationStub = fileURLToPath(
new URL("./tests/stubs/animation-helpers.js", import.meta.url),
);
export default defineConfig({
test: {
include: ["tests/unit/**/*.test.js"],
environment: "node",
globals: false,
alias: {
"./animation-helpers.js": animationStub,
},
},
});