diff --git a/backend/src/__tests__/adminDisputePagination.test.ts b/backend/src/__tests__/adminDisputePagination.test.ts index 6d86bcd9..e89c9fdd 100644 --- a/backend/src/__tests__/adminDisputePagination.test.ts +++ b/backend/src/__tests__/adminDisputePagination.test.ts @@ -146,7 +146,7 @@ describe('listLoanDisputes pagination', () => { // Verify the data-fetch query includes the status filter const dataCall = mockQuery.mock.calls.find( - (call) => call[0].includes('SELECT * FROM loan_disputes') && !call[0].includes('COUNT'), + (call) => calj[0].includes('SELECT * FROM loan_disputes') && !call[0].includes('COUNT'), ); expect(dataCall?.[0]).toContain('WHERE status = $1'); expect(dataCall?.[1]).toEqual(expect.arrayContaining(['resolved'])); diff --git a/backend/src/__tests__/adminGovernanceController.test.ts b/backend/src/__tests__/adminGovernanceController.test.ts index 2d7b582a..4ba6bf87 100644 --- a/backend/src/__tests__/adminGovernanceController.test.ts +++ b/backend/src/__tests__/adminGovernanceController.test.ts @@ -36,6 +36,7 @@ describe('adminGovernanceController - getPendingGovernance', () => { delete process.env.GOVERNANCE_CURRENT_ADMIN; delete process.env.MULTISIG_GOVERNANCE_CONTRACT_ID; delete process.env.GOVERNANCE_THRESHOLD; + delete process.env.GOVERNANCE_SIGNERS; }); it('filters signers so signers from older pending proposals are not mixed in', async () => { @@ -43,7 +44,7 @@ describe('adminGovernanceController - getPendingGovernance', () => { const res = createMockResponse(); // Database returns rows from multiple proposals (ordered by proposal_id DESC) - mockQuery.mockResolvedValueOnce({ + mockQuery.mockResolvedOnce({ rows: [ { proposal_id: 'prop-2', @@ -72,7 +73,7 @@ describe('adminGovernanceController - getPendingGovernance', () => { threshold: 2, executable_at: null, expires_at: null, - signer_address: 'GSIGNER_PROP1_ONLY', + signer_address: 'GSIGNER_PROP2_ONLY', approved: true, }, ], @@ -106,7 +107,7 @@ describe('adminGovernanceController - getPendingGovernance', () => { const req = {} as Request; const res = createMockResponse(); - mockQuery.mockResolvedValueOnce({ + mockQuery.mockResolvedOnce({ rows: [], rowCount: 0, }); @@ -115,7 +116,7 @@ describe('adminGovernanceController - getPendingGovernance', () => { await flushAsync(); expect(res.json).toHaveBeenCalledWith( - expect.objectContaining({ + expect.objectContaining( { pendingProposal: null, signers: [ { address: 'GSIGNER_1', approved: false },