immich/server/test/vitest.config.mjs
Dion de Koning cfc5ed5997
fix: timezone issue in tests (#25937)
* Fixed an issue where time tests fail in some timezones

* Revert previous fix and add TZ env variable to fix the issue

* Revert other changes and align TZ fix between server and web

* Revert package lock file

---------

Co-authored-by: Dion de Koning <dion@DionK01.local>
2026-02-05 19:24:23 +00:00

31 lines
709 B
JavaScript

import swc from 'unplugin-swc';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
root: './',
globals: true,
include: ['src/**/*.spec.ts'],
coverage: {
provider: 'v8',
include: ['src/cores/**', 'src/services/**', 'src/utils/**', 'src/sql-tools/**'],
exclude: [
'src/services/*.spec.ts',
'src/services/api.service.ts',
'src/services/microservices.service.ts',
'src/services/index.ts',
],
},
server: {
deps: {
fallbackCJS: true,
},
},
env: {
TZ: 'UTC',
},
},
plugins: [swc.vite(), tsconfigPaths()],
});