mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-19 23:06:15 +08:00
chore: fix tests using machine timezone (@fehmer) (#5740)
This commit is contained in:
parent
c413cbd364
commit
9f9663682d
|
@ -2,3 +2,4 @@ backend/dist
|
|||
backend/__migration__
|
||||
docker
|
||||
backend/scripts
|
||||
**/vitest.config.js
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import * as MongoDbMock from "vitest-mongodb";
|
||||
export async function setup({ provide }): Promise<void> {
|
||||
export async function setup(): Promise<void> {
|
||||
process.env.TZ = "UTC";
|
||||
await MongoDbMock.setup({
|
||||
serverOptions: {
|
||||
binary: {
|
||||
|
|
3
frontend/__tests__/global-setup.ts
Normal file
3
frontend/__tests__/global-setup.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
export const setup = () => {
|
||||
process.env.TZ = "UTC";
|
||||
};
|
|
@ -4,6 +4,7 @@ export default defineConfig({
|
|||
test: {
|
||||
globals: true,
|
||||
environment: "happy-dom",
|
||||
globalSetup: "__tests__/global-setup.ts",
|
||||
setupFiles: ["__tests__/setup-tests.ts"],
|
||||
|
||||
coverage: {
|
||||
|
|
Loading…
Reference in a new issue