-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvitest.config.mts
36 lines (34 loc) · 1012 Bytes
/
vitest.config.mts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { defineConfig } from 'vitest/config';
import viteConfig, { absolutePath } from './vite.config.mts';
const viteConfigWithoutHttps = defineConfig({
...viteConfig,
server: {
...viteConfig.server,
https: undefined,
proxy: undefined,
},
test: {
coverage: {
enabled: process.env['COVERAGE'] ? true : false,
include: ['app/javascript/**/*.{js,jsx,ts,tsx}'],
reportsDirectory: absolutePath('./coverage'),
reporter: ['text', 'cobertura'],
reportOnFailure: true,
},
environment: 'jsdom',
globals: true,
setupFiles: [absolutePath('./test/javascript/setupTests.ts')],
testTimeout: 10000,
reporters: [
'default',
['junit', { outputFile: absolutePath('./test/reports/TEST-jest.xml') }],
['html', { outputFile: absolutePath('./test/html_reports/jest-report.html') }],
],
server: {
deps: {
inline: ['@neinteractiveliterature/litform'],
},
},
},
});
export default viteConfigWithoutHttps;