mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-11 16:24:11 +01:00
* Tests: convert all common tests from mocha to karma * Tests: refactor Vuetify setup in tests * Tests: update package-lock.json * Tests: convert all model test to vitest 1/2 * Tests: convert all model test to vitest 2/2 * Tests: fix broken test * Tests: time zone UTC * Tests: Add playwright screenshots folder to gitignore * Tests: Add timezone to vitest scripts * Tests: Add Vitest scripts to Makefile * Tests: delete unused timezone configs * Tests: Update some tests * Tests: Update vitest config * Tests: Delete usesless try-catch
59 lines
1.5 KiB
JavaScript
59 lines
1.5 KiB
JavaScript
import { defineConfig } from "vitest/config";
|
|
import path from "path";
|
|
import vue from "@vitejs/plugin-vue";
|
|
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
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"),
|
|
"ui": path.resolve(__dirname, "./src/options/ui.js"),
|
|
"model.js": path.resolve(__dirname, "./src/model/model.js"),
|
|
"link.js": path.resolve(__dirname, "./src/model/link.js"),
|
|
"websocket.js": path.resolve(__dirname, "./src/common/websocket.js"),
|
|
},
|
|
},
|
|
|
|
optimizeDeps: {
|
|
include: ["vuetify"],
|
|
},
|
|
|
|
test: {
|
|
globals: true,
|
|
setupFiles: "./tests/vitest/setup.js",
|
|
include: ["tests/vitest/**/*.{test,spec}.{js,jsx,ts,tsx,vue}"],
|
|
exclude: ["**/node_modules/**", "**/dist/**"],
|
|
|
|
environment: "jsdom",
|
|
css: true,
|
|
pool: "vmForks",
|
|
testTimeout: 10000,
|
|
watch: false,
|
|
silent: true,
|
|
browser: {
|
|
enabled: false,
|
|
provider: "playwright",
|
|
headless: true,
|
|
isolate: false,
|
|
instances: [
|
|
{
|
|
browser: "chromium",
|
|
headless: true,
|
|
},
|
|
],
|
|
},
|
|
|
|
coverage: {
|
|
provider: "v8",
|
|
reporter: ["text", "html"],
|
|
include: ["src/**/*.{js,jsx,vue}"],
|
|
exclude: ["src/locales/**"],
|
|
},
|
|
},
|
|
});
|