.
This commit is contained in:
parent
d39148cac3
commit
a4d1bd345d
@ -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: {
|
||||
|
||||
@ -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"));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user