mirror of
https://github.com/web-infra-dev/midscene.git
synced 2025-07-09 01:51:24 +00:00
26 lines
572 B
TypeScript
26 lines
572 B
TypeScript
import path from 'node:path';
|
|
import dotenv from 'dotenv';
|
|
import { defineConfig } from 'vitest/config';
|
|
|
|
/**
|
|
* Read environment variables from file.
|
|
* https://github.com/motdotla/dotenv
|
|
*/
|
|
dotenv.config({
|
|
path: path.join(__dirname, '../../.env'),
|
|
});
|
|
|
|
const enableAiTest = Boolean(process.env.AITEST);
|
|
const basicTest = ['tests/unit-test/**/*.test.ts'];
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
include: enableAiTest ? ['tests/ai/**/*.test.ts', ...basicTest] : basicTest,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
});
|