Spaces:
Running
Running
File size: 632 Bytes
843a4b2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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,
},
},
});
|