Fix wrong imports in test and env setup for test profile

This commit is contained in:
Alexander Ungar 2023-03-29 09:25:22 +02:00
parent 3bd02f47c1
commit f6cd3e06cd
2 changed files with 9 additions and 7 deletions

View file

@ -1,11 +1,13 @@
import { cleanEnv, port, str, url } from "envalid";
import { cleanEnv, port, str, testOnly, url } from "envalid";
import * as process from "process";
const env = cleanEnv(process.env, {
PORT: port(),
LOG_LEVEL: str({ default: "info" }),
DATABASE_CONNECTION_STRING: url(),
DATABASE_NAME: str(),
PORT: port({ devDefault: testOnly(1234) }),
LOG_LEVEL: str({ default: "info", devDefault: testOnly("DEBUG") }),
DATABASE_CONNECTION_STRING: url({
devDefault: testOnly("mongodb://localhost:5678"),
}),
DATABASE_NAME: str({ devDefault: testOnly("my-finance-pal") }),
});
export default env;

View file

@ -1,7 +1,7 @@
import { type BudgetSummary, type NewBudget } from "src/domain/budget";
import Limit from "src/domain/limit";
import { createBudget } from "./budgetService";
import type BudgetUseCases from "./budgetUseCases";
import { type BudgetSummary, type NewBudget } from "../../domain/budget";
import Limit from "../../domain/limit";
describe("budgetService", () => {
it("calls the create function with the correct object", async () => {