msw
/
vitest.config.mts
27 строк · 837.0 Байт
1import * as path from 'node:path'2import { defineConfig } from 'vitest/config'3
4export default defineConfig({5test: {6globals: true,7// Lookup the unit tests in the "src" directory becase8// they are located next to the source code they are testing.9dir: './src',10alias: {11'~/core': path.resolve(__dirname, 'src/core'),12},13typecheck: {14// Load the TypeScript configuration to the unit tests.15// Otherwise, Vitest will use the root-level "tsconfig.json",16// which includes way too more than the tests need.17tsconfig: './tsconfig.test.unit.json',18},19environmentOptions: {20jsdom: {21// Drop the 3000 port from the default "location.href"22// for backward-compatibility with the existing tests.23url: 'http://localhost/',24},25},26},27})28