Files
Aniworld/vitest.config.js
2026-07-31 07:33:12 +02:00

22 lines
822 B
JavaScript

// vitest.config.js
// Provides a DOM environment for tests that touch document/window.
// Falls back to default node env for backend tests.
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
environment: 'happy-dom',
globals: true,
include: [
'tests/frontend/**/*.test.{js,ts}',
'tests/frontend/unit/**/*.test.{js,ts}',
],
exclude: [
// websocket.test.js defines a mock WebSocketClient class that is
// structurally incompatible with the real singleton IIFE in
// src/server/web/static/js/shared/websocket-client.js — skip it
// until the test suite is updated to match the real implementation.
'tests/frontend/unit/websocket.test.js',
],
},
});