Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-jeremy committed Jan 20, 2025
1 parent dafe026 commit f75816a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ const categoryGroups = generateCategoryGroups([
]);
const usualGroup = categoryGroups[1];

let transactions = generateTransactions(5, [6]);

function generateTransactions(
count: number,
splitAtIndexes: number[] = [],
Expand Down Expand Up @@ -212,6 +214,11 @@ function initBasicServer() {
return { data: payees, dependencies: [] };
case 'accounts':
return { data: accounts, dependencies: [] };
case 'transactions':
return {
data: transactions,
dependencies: [],
};
default:
throw new Error(`queried unknown table: ${query.table}`);
}
Expand Down Expand Up @@ -246,7 +253,7 @@ function prettyDate(date: string) {
}

function renderTransactions(extraProps?: Partial<LiveTransactionTableProps>) {
let transactions = generateTransactions(5, [6]);
transactions = generateTransactions(5, [6]);
// Hardcoding the first value makes it easier for tests to do
// various this
transactions[0].amount = -2777;
Expand Down

0 comments on commit f75816a

Please sign in to comment.