-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Márk Kővári <kovarimarkofficial@gmail.com>
- Loading branch information
1 parent
8af8ffa
commit 9368b43
Showing
3 changed files
with
17 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { http, HttpResponse } from 'msw' | ||
|
||
export const handlers = [ | ||
|
||
http.post('http://localhost:8080/register', (req, res, ctx) => { | ||
return res( | ||
ctx.json({ | ||
message: "error" | ||
}), | ||
ctx.status(400) | ||
) | ||
}) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { setupServer } from 'msw/node' | ||
import { handlers } from './handler' | ||
|
||
export const server = setupServer(...handlers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters