diff --git a/backend/__tests__/fp-submissions-cleanup.property.test.js b/backend/__tests__/fp-submissions-cleanup.property.test.js index 4d2cc70..12cb164 100644 --- a/backend/__tests__/fp-submissions-cleanup.property.test.js +++ b/backend/__tests__/fp-submissions-cleanup.property.test.js @@ -10,6 +10,19 @@ */ const fc = require('fast-check'); + +// Mock db pool before importing the route module (avoids DATABASE_URL requirement) +jest.mock('../db', () => ({ + query: jest.fn(() => Promise.resolve({ rows: [], rowCount: 0 })), +})); + +// Mock dependencies that the route module imports +jest.mock('../helpers/auditLog', () => jest.fn()); +jest.mock('../helpers/ivantiApi', () => ({ + ivantiFormPost: jest.fn(), + ivantiPost: jest.fn(), +})); + const { filterVisibleSubmissions, shouldShowDismissButton } = require('../routes/ivantiFpWorkflow'); // --- Generators ---