mirror of
https://github.com/immich-app/immich.git
synced 2026-02-09 19:29:27 +03:00
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>
This commit is contained in:
@@ -2,9 +2,6 @@ import swc from 'unplugin-swc';
|
||||
import tsconfigPaths from 'vite-tsconfig-paths';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
// Set the timezone to UTC to avoid timezone issues during testing
|
||||
process.env.TZ = 'UTC';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
root: './',
|
||||
@@ -25,6 +22,9 @@ export default defineConfig({
|
||||
fallbackCJS: true,
|
||||
},
|
||||
},
|
||||
env: {
|
||||
TZ: 'UTC',
|
||||
},
|
||||
},
|
||||
plugins: [swc.vite(), tsconfigPaths()],
|
||||
});
|
||||
|
||||
@@ -63,5 +63,8 @@ export default defineConfig({
|
||||
sequence: {
|
||||
hooks: 'list',
|
||||
},
|
||||
env: {
|
||||
TZ: 'UTC',
|
||||
},
|
||||
},
|
||||
} as UserConfig);
|
||||
|
||||
Reference in New Issue
Block a user