26 lines
702 B
TypeScript
26 lines
702 B
TypeScript
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({});
|
|
});
|
|
});
|