mirror of
https://github.com/web-infra-dev/midscene.git
synced 2025-11-30 08:59:59 +00:00
28 lines
551 B
TypeScript
28 lines
551 B
TypeScript
import path from 'node:path';
|
|
//@ts-ignore
|
|
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);
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
},
|
|
},
|
|
test: {
|
|
include: enableAiTest
|
|
? ['tests/ai/**/*.test.ts']
|
|
: ['tests/unit-test/*.test.ts'],
|
|
},
|
|
});
|