From df479a86a1a9e7125efe24f5d840c8a2371b8ccb Mon Sep 17 00:00:00 2001 From: Abir Stolov Date: Sat, 30 Nov 2024 13:21:41 +0200 Subject: [PATCH] refactor: YNAB isSameTransaction tests --- .../src/backend/export/outputVendors/ynab/ynab.test.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/main/src/backend/export/outputVendors/ynab/ynab.test.ts b/packages/main/src/backend/export/outputVendors/ynab/ynab.test.ts index 4232648b..62cc9174 100644 --- a/packages/main/src/backend/export/outputVendors/ynab/ynab.test.ts +++ b/packages/main/src/backend/export/outputVendors/ynab/ynab.test.ts @@ -6,9 +6,9 @@ import * as ynab from './ynab'; import ClearedEnum = SaveTransaction.ClearedEnum; describe('ynab', () => { - describe('isSameTransaction(Payee changed)', () => { + describe('isSameTransaction', () => { test('Two transactions with different payee names should be considered the same if they have the same import id', () => { - const transferTransactionFromYnab: TransactionDetail = { + const differentPayeeTransactionFromYnab: TransactionDetail = { id: '579ae642-d161-4bbe-9d54-ae3322c93cf7', date: '2019-06-27', amount: -1000000, @@ -39,10 +39,8 @@ describe('ynab', () => { import_id: '2019-06-27-1000000שיק', }; - expect(ynab.isSameTransaction(transactionFromFinancialAccount, transferTransactionFromYnab)).toBeTruthy(); + expect(ynab.isSameTransaction(transactionFromFinancialAccount, differentPayeeTransactionFromYnab)).toBeTruthy(); }); - }); - describe('isSameTransaction', () => { test('Two transactions with different payee names should be considered the same if one of them is a transfer transaction', () => { const transferTransactionFromYnab: TransactionDetail = { id: '579ae642-d161-4bbe-9d54-ae3322c93cf7',