fixing tests, move node tests to vitest

This commit is contained in:
dswbx
2025-06-13 14:38:30 +02:00
parent bbb7bfb7a1
commit f8d2a9090e
27 changed files with 341 additions and 174 deletions

View File

@@ -1,18 +1,26 @@
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
import path from "node:path";
export default defineConfig({
plugins: [react(), tsconfigPaths()],
plugins: [tsconfigPaths()],
test: {
globals: true,
environment: "jsdom",
setupFiles: ["./__test__/vitest/setup.ts"],
projects: ["**/*.vitest.config.ts"],
include: ["**/*.vi-test.ts", "**/*.vitest.ts"],
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
exclude: ["node_modules/", "**/*.d.ts", "**/*.test.ts", "**/*.config.ts"],
},
},
});
// export defineConfig({
// plugins: [tsconfigPaths()],
// test: {
// globals: true,
// environment: "jsdom",
// setupFiles: ["./__test__/vitest/setup.ts"],
// include: ["**/*.vi-test.ts", "**/*.vitest.ts"],
// coverage: {
// provider: "v8",
// reporter: ["text", "json", "html"],
// exclude: ["node_modules/", "**/*.d.ts", "**/*.test.ts", "**/*.config.ts"],
// },
// },
// });