From 5aadc096d19827107b4973892db3bd786dc4eb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoni=20Nu=C3=B1ez=20Romeu?= Date: Thu, 16 Jul 2026 10:51:01 +0200 Subject: [PATCH] fix: add ok: true to fetch mocks in SearchView tests --- apps/frontend/src/App.test.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/frontend/src/App.test.jsx b/apps/frontend/src/App.test.jsx index 0a6b055..d2f2f90 100644 --- a/apps/frontend/src/App.test.jsx +++ b/apps/frontend/src/App.test.jsx @@ -55,6 +55,7 @@ describe('SearchView', () => { { id: 'REG001', name: 'Ibuprofeno 400mg', active_ingredient: 'Ibuprofeno', dosage: '400mg', form: 'Comprimido' }, ] vi.spyOn(globalThis, 'fetch').mockResolvedValue({ + ok: true, json: async () => medicines, }) @@ -76,6 +77,7 @@ describe('SearchView', () => { { id: 'REG001', name: 'Ibuprofeno 400mg', active_ingredient: 'Ibuprofeno', dosage: '400mg', form: 'Comprimido' }, ] vi.spyOn(globalThis, 'fetch').mockResolvedValue({ + ok: true, json: async () => medicines, })