photoprism/frontend/vitest.config.js
Ömer Duran 7ab90720ff
Tests: write Initial Tests for .vue Components (#5003)
* Tests: Add initial Vue component tests
* Tests: Update package scripts
2025-05-13 11:53:17 +02:00

28 lines
954 B
JavaScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import vue from "@vitejs/plugin-vue";
import tsconfigPaths from "vite-tsconfig-paths";
import path from "path";
export default defineConfig({
plugins: [react(), vue(), tsconfigPaths()],
test: {
globals: true,
environment: "jsdom",
setupFiles: ["./tests/vitest/setup.js", "./tests/vitest/vue-setup.js"],
include: ["tests/vitest/**/*.{test,spec}.{js,jsx}"],
coverage: {
reporter: ["text", "html"],
include: ["src/**/*.{js,jsx,vue}"],
exclude: ["src/locales/**"],
},
alias: {
app: path.resolve(__dirname, "./src/app"),
common: path.resolve(__dirname, "./src/common"),
component: path.resolve(__dirname, "./src/component"),
model: path.resolve(__dirname, "./src/model"),
options: path.resolve(__dirname, "./src/options"),
page: path.resolve(__dirname, "./src/page"),
},
},
});