switch to remix
This commit is contained in:
commit
52a0ba1b3b
77 changed files with 13468 additions and 0 deletions
7
mocks/README.md
Normal file
7
mocks/README.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# Mocks
|
||||
|
||||
Use this to mock any third party HTTP resources that you don't have running locally and want to have mocked for local development as well as tests.
|
||||
|
||||
Learn more about how to use this at [mswjs.io](https://mswjs.io/)
|
||||
|
||||
For an extensive example, see the [source code for kentcdodds.com](https://github.com/kentcdodds/kentcdodds.com/blob/main/mocks/start.ts)
|
||||
2
mocks/index.js
Normal file
2
mocks/index.js
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
require("esbuild-register/dist/node").register();
|
||||
require("./start");
|
||||
9
mocks/start.ts
Normal file
9
mocks/start.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { setupServer } from "msw/node";
|
||||
|
||||
const server = setupServer();
|
||||
|
||||
server.listen({ onUnhandledRequest: "warn" });
|
||||
console.info("🔶 Mock server running");
|
||||
|
||||
process.once("SIGINT", () => server.close());
|
||||
process.once("SIGTERM", () => server.close());
|
||||
Loading…
Add table
Add a link
Reference in a new issue