mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-13 11:03:50 +00:00
Replace jest config with vitest config
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { defineConfig } from 'vite';
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import { manifest } from './manifest';
|
||||
import pack from './package.json';
|
||||
|
||||
@@ -24,4 +24,30 @@ export default defineConfig({
|
||||
port: 3000,
|
||||
},
|
||||
base: !homepage ? undefined : homepage, // Not using just homepage because empty string should be discarded
|
||||
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
setupFiles: './config/test/setupTests.ts',
|
||||
coverage: {
|
||||
provider: 'c8', // TODO Try istanbul
|
||||
reporter: ['text', 'text-summary', 'html', 'clover'],
|
||||
include: [
|
||||
'src/**/*.{ts,tsx}',
|
||||
'!src/*.{ts,tsx}',
|
||||
'!src/reducers/index.ts',
|
||||
'!src/**/provideServices.ts',
|
||||
'!src/container/*.ts',
|
||||
],
|
||||
|
||||
// Required code coverage. Lower than this will make the check fail
|
||||
statements: 90,
|
||||
branches: 80,
|
||||
functions: 85,
|
||||
lines: 90,
|
||||
},
|
||||
deps: {
|
||||
inline: ['vitest-canvas-mock'],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user