Created
November 30, 2021 00:50
-
-
Save harada-shota/a2b799cffc5793f71a0c57d10dcf565f to your computer and use it in GitHub Desktop.
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
import { setupWorker, rest } from "msw"; | |
const worker = setupWorker( | |
rest.get("/login", (req, res, ctx) => { | |
const { username } = req.body | |
return res( | |
ctx.json({ | |
username, | |
firstName: 'hoge' | |
}) | |
); | |
}) | |
); | |
worker.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment