refactor: bank rules e2e test cases

This commit is contained in:
Ahmed Bouhuolia
2025-01-06 18:10:24 +02:00
parent 2bf58d9cb4
commit 385d84d654
27 changed files with 357 additions and 91 deletions

View File

@@ -80,10 +80,9 @@ export class PlaidSyncDb {
item: PlaidItem,
trx?: Knex.Transaction,
): Promise<void> {
const transformToPlaidAccounts = transformPlaidAccountToCreateAccount(
item,
institution,
);
const transformToPlaidAccounts = R.curry(
transformPlaidAccountToCreateAccount,
)(item, institution);
const accountCreateDTOs = R.map(transformToPlaidAccounts)(plaidAccounts);
await bluebird.map(
@@ -112,7 +111,7 @@ export class PlaidSyncDb {
.throwIfNotFound();
// Transformes the Plaid transactions to cashflow create DTOs.
const transformTransaction = transformPlaidTrxsToCashflowCreate(
const transformTransaction = R.curry(transformPlaidTrxsToCashflowCreate)(
cashflowAccount.id,
);
const uncategorizedTransDTOs =