Spaces:
Running
Running
| 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, | |
| }, | |
| }, | |
| }); | |