import { fileURLToPath } from 'node:url'; import { defineConfig } from 'vitest/config'; // SDK 不依赖 React 测试初始化;Tyro 的脚本加载测试需要 DOM。 export default defineConfig({ root: fileURLToPath(new URL('.', import.meta.url)), cacheDir: fileURLToPath( new URL( '../../../../node_modules/.vite/pi-payment-old-sdk', import.meta.url ) ), test: { environment: 'jsdom', include: ['__tests__/**/*.test.ts'], }, });