From a4d1bd345dbb918b43228e18826397cbd671950a Mon Sep 17 00:00:00 2001 From: david Date: Sat, 8 Mar 2025 11:08:27 +0100 Subject: [PATCH] . --- apps/server/jest.config.ts | 2 +- .../src/contexts/accounts/domain/services/account.service.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/server/jest.config.ts b/apps/server/jest.config.ts index 74a9dec8..781e835e 100644 --- a/apps/server/jest.config.ts +++ b/apps/server/jest.config.ts @@ -5,7 +5,7 @@ export default { preset: "ts-jest", testEnvironment: "node", rootDir: "./", - testMatch: ["**/*.spec.ts"], + testMatch: ["**/*.test.ts", "**/*.spec.ts"], moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"], moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: "/src/" }), transform: { diff --git a/apps/server/src/contexts/accounts/domain/services/account.service.ts b/apps/server/src/contexts/accounts/domain/services/account.service.ts index 90df8084..f2098ae6 100644 --- a/apps/server/src/contexts/accounts/domain/services/account.service.ts +++ b/apps/server/src/contexts/accounts/domain/services/account.service.ts @@ -73,6 +73,7 @@ export class AccountService implements IAccountService { async activateAccount(id: UniqueID, transaction?: Transaction): Promise> { const accountOrError = await this.repo.findById(id, transaction); + if (accountOrError.isFailure) { return Result.fail(new Error("Account not found")); }