diff --git a/backend/api/src/get-profiles.ts b/backend/api/src/get-profiles.ts index ada84903..a75398c6 100644 --- a/backend/api/src/get-profiles.ts +++ b/backend/api/src/get-profiles.ts @@ -797,7 +797,7 @@ export const loadProfiles = async (props: profileQueryType, db?: SupabaseDirectC } } - console.debug('profiles:', profiles) + // console.debug('profiles:', profiles) const countQuery = renderSql(select(`count(*) as count`), ...tableSelection, ...filters) diff --git a/backend/api/tests/unit/get-profiles.unit.test.ts b/backend/api/tests/unit/get-profiles.unit.test.ts index 89422380..58fe640e 100644 --- a/backend/api/tests/unit/get-profiles.unit.test.ts +++ b/backend/api/tests/unit/get-profiles.unit.test.ts @@ -75,8 +75,8 @@ describe('loadProfiles', () => { beforeEach(() => { jest.clearAllMocks() mockPg = { - map: jest.fn(), - one: jest.fn(), + map: jest.fn().mockResolvedValue([]), + one: jest.fn().mockResolvedValue(0), } jest.spyOn(supabaseInit, 'createSupabaseDirectClient').mockReturnValue(mockPg) @@ -93,6 +93,7 @@ describe('loadProfiles', () => { limit: 10, name: 'John', is_smoker: true, + projection: 'full' as const, } ;(mockPg.map as jest.Mock).mockResolvedValue([])