Debian Codegraph @

__tests__/external/node-only/interceptor-test.js

raw
1 import { Server } from "miragejs";
2
3 describe("External |Node only | Interceptor", () => {
4 test("newing a server with various interceptor config works in node", () => {
5 let server = new Server({
6 environment: "test",
7 routes() {
8 this.namespace = "api";
9
10 this.resource("user");
11
12 this.passthrough();
13 },
14 });
15
16 server.timing = 1000;
17
18 expect(server).toBeTruthy();
19
20 server.shutdown();
21 });
22 });