mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-02 12:18:15 +08:00
fix: vitest config
This commit is contained in:
parent
79f14d9024
commit
3409a113dc
@ -186,20 +186,24 @@ export const defineConfig = () => {
|
||||
const isServer = process.env.TEST_ENV === 'server-side';
|
||||
const config = vitestConfig(mergeConfig(defineCommonConfig(), isServer ? defineServerConfig() : defineClientConfig()));
|
||||
|
||||
const filterInclude = getFilterInclude(isServer);
|
||||
if (filterInclude) {
|
||||
config.test.include = getFilterInclude(isServer);
|
||||
}
|
||||
|
||||
|
||||
const isCoverage = process.argv.includes('--coverage');
|
||||
if (!isCoverage) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const filterInclude = getFilterInclude(isServer);
|
||||
if (filterInclude) {
|
||||
config.test.include = getFilterInclude(isServer);
|
||||
}
|
||||
|
||||
config.test.coverage.include = getFilterInclude(isServer, true);
|
||||
const reportsDirectory = getReportsDirectory(isServer);
|
||||
if (reportsDirectory) {
|
||||
config.test.coverage.reportsDirectory = reportsDirectory;
|
||||
}
|
||||
|
||||
|
||||
return config;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user