1
0

vitest.config.ts 800 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: CC0-1.0
  4. */
  5. import { defineConfig } from 'vitest/config'
  6. import vue from '@vitejs/plugin-vue2'
  7. export default defineConfig({
  8. plugins: [vue()],
  9. test: {
  10. include: ['{apps,core}/**/*.{test,spec}.?(c|m)[jt]s?(x)'],
  11. environment: 'jsdom',
  12. environmentOptions: {
  13. jsdom: {
  14. url: 'http://nextcloud.local',
  15. },
  16. },
  17. coverage: {
  18. include: ['apps/*/src/**', 'core/src/**'],
  19. exclude: [
  20. '**/*.spec.*',
  21. '**/*.test.*',
  22. '**/*.cy.*',
  23. 'core/src/tests/**',
  24. ],
  25. provider: 'v8',
  26. reporter: ['lcov', 'text'],
  27. },
  28. setupFiles: ['__tests__/mock-window.js', '__tests__/setup-testing-library.js'],
  29. server: {
  30. deps: {
  31. inline: [/@nextcloud\//],
  32. },
  33. },
  34. },
  35. })