Fixed api tests.
All checks were successful
farmcontrol/farmcontrol-api/pipeline/head This commit looks good

This commit is contained in:
Tom Butcher 2026-03-01 02:09:41 +00:00
parent 3e47cb131b
commit a2d62ddec1

View File

@ -8,15 +8,17 @@ jest.unstable_mockModule('../utils.js', () => ({
// Mock src/utils.js (where most database.js helpers live)
jest.unstable_mockModule('../../utils.js', () => ({
deleteAuditLog: jest.fn(),
deleteNotification: jest.fn(),
distributeDelete: jest.fn(),
editAuditLog: jest.fn(),
editNotification: jest.fn(),
expandObjectIds: jest.fn((obj) => obj),
modelHasRef: jest.fn(() => false),
getFieldsByRef: jest.fn(() => []),
getQueryToCacheKey: jest.fn(({ model, id }) => `${model}:${id}`),
editAuditLog: jest.fn(),
distributeUpdate: jest.fn(),
modelHasRef: jest.fn(() => false),
newAuditLog: jest.fn(),
distributeNew: jest.fn(),
distributeUpdate: jest.fn(),
distributeChildUpdate: jest.fn(),
distributeChildDelete: jest.fn(),
distributeChildNew: jest.fn(),