Skip to content

Instantly share code, notes, and snippets.

@marta-pinkowska
Last active February 20, 2023 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save marta-pinkowska/8d9e056ca1152fd3ec7d269063263822 to your computer and use it in GitHub Desktop.
Save marta-pinkowska/8d9e056ca1152fd3ec7d269063263822 to your computer and use it in GitHub Desktop.
export const setupSmartMswHelper = (override = {}) => {
server.use(
rest.get("https://fancy-app.com/return-some-data", (req, res, ctx) => {
return res(
ctx.status(200),
ctx.json({
fancyData: "Im so fancy!",
moreData: "You already know",
...override,
})
);
})
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment