mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-14 23:22:22 +00:00
chore: vitest support (#4026)
* chore: vitest * chore: move test files * chore: support vitest * fix: exclude test files * chore(ci): add test workflow * feat: remove read env
This commit is contained in:
23
vitest.config.mts
Normal file
23
vitest.config.mts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
export default defineConfig({
|
||||
test: {
|
||||
coverage: {
|
||||
enabled: true,
|
||||
reporter: ['html', 'json-summary', 'json'],
|
||||
all: false,
|
||||
reportOnFailure: true
|
||||
},
|
||||
outputFile: 'test-results.json',
|
||||
setupFiles: ['./test/setup.ts'],
|
||||
include: ['./test/test.ts', './projects/app/**/*.test.ts'],
|
||||
testTimeout: 5000
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve('projects/app/src'),
|
||||
'@fastgpt': resolve('packages'),
|
||||
'@test': resolve('test')
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user