forked from cartsnitch/cartsnitch
feat: add MSW for integration test mocking
Install Mock Service Worker (MSW) and configure it for vitest. Write one integration test for usePurchases hook using MSW. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
committed by
Barcode Betty
parent
b18cb24ec4
commit
98d95a661a
@@ -1 +1,6 @@
|
||||
import '@testing-library/jest-dom/vitest'
|
||||
import { server } from './mocks/server'
|
||||
|
||||
beforeAll(() => server.listen())
|
||||
afterEach(() => server.resetHandlers())
|
||||
afterAll(() => server.close())
|
||||
|
||||
Reference in New Issue
Block a user