moar unit test !
Some checks failed
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Failing after 5m45s

This commit is contained in:
2025-12-07 14:54:49 -08:00
parent ef07417978
commit b48445b713
8 changed files with 57 additions and 6 deletions

View File

@@ -120,7 +120,10 @@ describe('Shopping DB Service', () => {
const result = await updateShoppingListItem(1, { is_purchased: true });
expect(mockPoolInstance.query).toHaveBeenCalledWith(expect.stringContaining('UPDATE public.shopping_list_items SET'), [true, undefined, undefined, 1]);
expect(mockPoolInstance.query).toHaveBeenCalledWith(
'UPDATE public.shopping_list_items SET is_purchased = $1 WHERE shopping_list_item_id = $2 RETURNING *',
[true, 1]
);
expect(result).toEqual(mockItem);
});