vitest.config.ts 487 B

12345678910111213141516171819202122
  1. import react from "@vitejs/plugin-react";
  2. import path from "path";
  3. import { defineConfig } from "vitest/config";
  4. export default defineConfig({
  5. plugins: [react()],
  6. test: {
  7. environment: "jsdom",
  8. globals: true,
  9. setupFiles: ["./vitest.setup.ts"],
  10. include: ["src/**/*.{test,spec}.{ts,tsx}"],
  11. coverage: {
  12. provider: "v8",
  13. reporter: ["text", "json", "html"],
  14. },
  15. },
  16. resolve: {
  17. alias: {
  18. "@": path.resolve(__dirname, "./src"),
  19. },
  20. },
  21. });