vitest.config.mts 923 B

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