vitest.config.mts 815 B

123456789101112131415161718192021222324252627
  1. import { defineConfig } from "vitest/config";
  2. export default defineConfig({
  3. //@ts-ignore
  4. test: {
  5. // Since hooks are running in stack in v2, which means all hooks run serially whereas
  6. // we need to run them in parallel
  7. sequence: {
  8. hooks: "parallel",
  9. },
  10. setupFiles: ["./setupTests.ts"],
  11. globals: true,
  12. environment: "jsdom",
  13. coverage: {
  14. reporter: ["text", "json-summary", "json", "html", "lcovonly"],
  15. // Since v2, it ignores empty lines by default and we need to disable it as it affects the coverage
  16. // Additionally the thresholds also needs to be updated slightly as a result of this change
  17. ignoreEmptyLines: false,
  18. thresholds: {
  19. lines: 60,
  20. branches: 70,
  21. functions: 63,
  22. statements: 60,
  23. },
  24. },
  25. },
  26. });