Files
mb-grid-solutions.com/vitest.config.mts
Marc Mintel 4334d31445
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 5s
Build & Deploy / 🧪 QA (push) Successful in 2m22s
Build & Deploy / 🏗️ Build (push) Successful in 4m48s
Build & Deploy / 🚀 Deploy (push) Failing after 11s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
test: disable happy-dom iframe and resource loading to silence AbortError logs
2026-02-27 22:55:50 +01:00

32 lines
965 B
TypeScript

import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
test: {
environment: 'happy-dom',
environmentOptions: {
happyDOM: {
settings: {
disableIframePageLoading: true,
disableJavaScriptFileLoading: true,
disableCSSFileLoading: true,
}
}
},
globals: true,
setupFiles: ['./tests/setup.tsx'],
alias: {
'next/server': 'next/server.js',
'@payload-config': new URL('./tests/__mocks__/payload-config.ts', import.meta.url).pathname,
'@': new URL('./', import.meta.url).pathname,
},
exclude: ['**/node_modules/**', '**/.next/**'],
server: {
deps: {
inline: ['next-intl', '@mintel/next-utils'],
},
},
},
});