Add effective-date transaction filtering and bulk selection
This commit is contained in:
25
src/pages/transactionFilterReset.test.ts
Normal file
25
src/pages/transactionFilterReset.test.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
import {
|
||||
DEFAULT_TRANSACTION_FILTER_RESET,
|
||||
getResetTransactionFilterState,
|
||||
} from "@/lib/transactionFilterReset";
|
||||
|
||||
describe("transaction filter reset defaults", () => {
|
||||
test("resets global and page-level transaction filters", () => {
|
||||
expect(getResetTransactionFilterState()).toEqual({
|
||||
global: {
|
||||
preset: "current-month",
|
||||
accountId: undefined,
|
||||
categoryIds: [],
|
||||
monthBasis: "effective",
|
||||
},
|
||||
page: {
|
||||
search: "",
|
||||
type: "all",
|
||||
pendingOnly: false,
|
||||
rowSelection: {},
|
||||
},
|
||||
});
|
||||
expect(DEFAULT_TRANSACTION_FILTER_RESET.page.rowSelection).toEqual({});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user