vitest.config.ts 909 B

12345678910111213141516171819202122232425262728293031323334
  1. import { defineConfig } from "vitest/config"
  2. import * as path from "path"
  3. import Icons from "unplugin-icons/vite"
  4. import { FileSystemIconLoader } from "unplugin-icons/loaders"
  5. import Vue from "@vitejs/plugin-vue"
  6. export default defineConfig({
  7. test: {
  8. environment: "jsdom",
  9. setupFiles: "./src/setupTests.ts",
  10. },
  11. resolve: {
  12. alias: {
  13. "~": path.resolve(__dirname, "../hoppscotch-common/src"),
  14. "@composables": path.resolve(
  15. __dirname,
  16. "../hoppscotch-common/src/composables"
  17. ),
  18. },
  19. },
  20. plugins: [
  21. Vue(),
  22. Icons({
  23. compiler: "vue3",
  24. customCollections: {
  25. hopp: FileSystemIconLoader("../hoppscotch-common/assets/icons"),
  26. auth: FileSystemIconLoader("../hoppscotch-common/assets/icons/auth"),
  27. brands: FileSystemIconLoader(
  28. "../hoppscotch-common/assets/icons/brands"
  29. ),
  30. },
  31. }) as any,
  32. ],
  33. })