import { fileURLToPath } from 'node:url'; import { defineConfig } from 'vitest/config'; export default defineConfig({ resolve: { // The entry loads its Node-only half through the package self-reference; // point it at the source so the tests do not depend on a built `dist`. alias: { 'astro-intlayer/integration': fileURLToPath( new URL('./src/integration.ts', import.meta.url) ), }, }, test: { environment: 'jsdom', globals: true, clearMocks: true, mockReset: true, restoreMocks: true, passWithNoTests: true, include: ['src/**/*.test.{js,jsx,ts,tsx}'], exclude: ['**/node_modules/**', '**/dist/**'], }, });