This commit is contained in:
David Arranz 2025-03-08 11:08:27 +01:00
parent d39148cac3
commit a4d1bd345d
2 changed files with 2 additions and 1 deletions

View File

@ -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: "<rootDir>/src/" }),
transform: {

View File

@ -73,6 +73,7 @@ export class AccountService implements IAccountService {
async activateAccount(id: UniqueID, transaction?: Transaction): Promise<Result<Account, Error>> {
const accountOrError = await this.repo.findById(id, transaction);
if (accountOrError.isFailure) {
return Result.fail(new Error("Account not found"));
}