/
githubmirror
/
strapi
Обзор
Документация
Войти
/
githubmirror
/
strapi
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/utils/vitest-config/src/presets/unit.ts
32 строки
775 B
Nico André
chore(*/vitest): introduce Vitest and vitest-config package (#25286)
12 фев 2026, 18:10
Не верифицирован
12 фев 2026, 18:10
3199352
Код
Авторство
О чём код?
import { defineConfig } from 'vitest/config'; export const unitPreset = defineConfig({ test: { // Require explicit imports from 'vitest' (no globals) globals: false, // Node environment for backend unit tests environment: 'node', // Only run tests with .vitest.test.ts suffix for incremental migration include: ['**/*.vitest.test.ts'], // Exclude common non-test files and directories exclude: [ '**/node_modules/**', '**/dist/**', '**/.cache/**', '**/*.testdata.{js,ts}', '**/*.test.utils.{js,ts}', '**/*.d.ts', '**/__tests__/resources/**', '**/tests/resources/**', ], // Match Jest's default timeout testTimeout: 5000, // Watch mode settings watch: false, }, });