const { FINANCE_LEDGER_EXPORT_HEADERS, buildFinanceLedgerWhere, } = require("../../../src/services/financeLedger"); describe("finance ledger service", () => { it("includes project fields in keyword search and export headers", () => { const where = buildFinanceLedgerWhere({ q: "交付项目" }); expect(where).toEqual({ AND: [ { deleted_at: null }, { OR: expect.arrayContaining([ { project: { is: { project_no: { contains: "交付项目", mode: "insensitive" } } } }, { project: { is: { name: { contains: "交付项目", mode: "insensitive" } } } }, ]), }, ], }); expect(FINANCE_LEDGER_EXPORT_HEADERS).toContain("项目"); }); });