mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
28 lines
610 B
TypeScript
28 lines
610 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import type { InlineConfig } from 'vitest/node';
|
|
|
|
export const createVitestConfig = (options: InlineConfig = {}) => {
|
|
const vitestConfig = defineConfig({
|
|
test: {
|
|
silent: true,
|
|
globals: true,
|
|
environment: 'node',
|
|
...(process.env.COVERAGE_ENABLED === 'true'
|
|
? {
|
|
coverage: {
|
|
enabled: true,
|
|
provider: 'v8',
|
|
reporter: process.env.CI === 'true' ? 'cobertura' : 'text-summary',
|
|
all: true,
|
|
},
|
|
}
|
|
: {}),
|
|
...options,
|
|
},
|
|
});
|
|
|
|
return vitestConfig;
|
|
};
|
|
|
|
export const vitestConfig = createVitestConfig();
|