From 190550fe8e80ff8da0ce0d73c79993d45ac9f62b Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Wed, 3 Nov 2021 12:53:25 +0000 Subject: [PATCH] Tools: Fixed server tests --- packages/server/src/utils/testing/testUtils.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/server/src/utils/testing/testUtils.ts b/packages/server/src/utils/testing/testUtils.ts index 94c5ff3a1..62ec7b388 100644 --- a/packages/server/src/utils/testing/testUtils.ts +++ b/packages/server/src/utils/testing/testUtils.ts @@ -23,6 +23,7 @@ import MustacheService from '../../services/MustacheService'; import uuidgen from '../uuidgen'; import { createCsrfToken } from '../csrf'; import { cookieSet } from '../cookies'; +import { parseEnv } from '../../env'; // Takes into account the fact that this file will be inside the /dist directory // when it runs. @@ -73,20 +74,20 @@ export async function beforeAllDb(unitName: string, createDbOptions: CreateDbOpt // // sudo docker compose -f docker-compose.db-dev.yml up - // await initConfig(Env.Dev, { + // await initConfig(Env.Dev, parseEnv({ // DB_CLIENT: 'pg', // POSTGRES_DATABASE: unitName, // POSTGRES_USER: 'joplin', // POSTGRES_PASSWORD: 'joplin', // SUPPORT_EMAIL: 'testing@localhost', - // }, { + // }), { // tempDir: tempDir, // }); - await initConfig(Env.Dev, { + await initConfig(Env.Dev, parseEnv({ SQLITE_DATABASE: createdDbPath_, SUPPORT_EMAIL: 'testing@localhost', - } as any, { + }), { tempDir: tempDir, });