fix: add ok: true to fetch mocks in SearchView tests
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Successful in 1m37s
Run Tests on Branches / Frontend Tests (push) Successful in 1m41s
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped

This commit is contained in:
Antoni Nuñez Romeu
2026-07-16 10:51:01 +02:00
parent a85fd6cd05
commit 5aadc096d1
+2
View File
@@ -55,6 +55,7 @@ describe('SearchView', () => {
{ id: 'REG001', name: 'Ibuprofeno 400mg', active_ingredient: 'Ibuprofeno', dosage: '400mg', form: 'Comprimido' }, { id: 'REG001', name: 'Ibuprofeno 400mg', active_ingredient: 'Ibuprofeno', dosage: '400mg', form: 'Comprimido' },
] ]
vi.spyOn(globalThis, 'fetch').mockResolvedValue({ vi.spyOn(globalThis, 'fetch').mockResolvedValue({
ok: true,
json: async () => medicines, json: async () => medicines,
}) })
@@ -76,6 +77,7 @@ describe('SearchView', () => {
{ id: 'REG001', name: 'Ibuprofeno 400mg', active_ingredient: 'Ibuprofeno', dosage: '400mg', form: 'Comprimido' }, { id: 'REG001', name: 'Ibuprofeno 400mg', active_ingredient: 'Ibuprofeno', dosage: '400mg', form: 'Comprimido' },
] ]
vi.spyOn(globalThis, 'fetch').mockResolvedValue({ vi.spyOn(globalThis, 'fetch').mockResolvedValue({
ok: true,
json: async () => medicines, json: async () => medicines,
}) })