Jest to Vitest migration (#230)

* working without clean up

* clean up dependencies

* use test not dev

* add tests for kclErrToDiagnostic

* remove jest config

* remove unneeded @ts-ignore
This commit is contained in:
Kurt Hutten
2023-08-08 10:50:27 +10:00
committed by GitHub
parent ca985dd1a8
commit 7a537eea8e
10 changed files with 796 additions and 1575 deletions

View File

@ -2,7 +2,7 @@ import react from '@vitejs/plugin-react'
import viteTsconfigPaths from 'vite-tsconfig-paths'
import eslint from 'vite-plugin-eslint'
import dns from 'dns'
import { defineConfig } from 'vite'
import { defineConfig } from 'vitest/config';
// Only needed because we run Node < 17
// and we want to open `localhost` not `127.0.0.1` on server start
@ -14,6 +14,14 @@ const config = defineConfig({
open: true,
port: 3000,
},
test: {
globals: true,
setupFiles: 'src/setupTests.ts',
environment: 'happy-dom',
coverage: {
provider: 'istanbul' // or 'v8'
},
},
build: {
outDir: 'build',
},