Todo
This commit is contained in:
7
test/mocks/handlers.ts
Normal file
7
test/mocks/handlers.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { HttpResponse, http } from "msw"
|
||||
|
||||
export const handlers = [
|
||||
http.get("https://example.test/health", () => {
|
||||
return HttpResponse.json({ ok: true })
|
||||
}),
|
||||
]
|
||||
5
test/mocks/server.ts
Normal file
5
test/mocks/server.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { setupServer } from "msw/node"
|
||||
|
||||
import { handlers } from "./handlers"
|
||||
|
||||
export const server = setupServer(...handlers)
|
||||
Reference in New Issue
Block a user