-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathhandlers.ts
More file actions
35 lines (30 loc) · 977 Bytes
/
handlers.ts
File metadata and controls
35 lines (30 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { http, HttpResponse } from "msw";
import { readFileSync } from "fs";
import path from "path";
const registry = readFileSync(
path.resolve(__dirname, "../../public/registry.db"),
);
const projectsListWithDefaultProject = http.get("/projects-list.json", () =>
HttpResponse.json({
default: "credit_scoring_aws",
projects: [
{
name: "Credit Score Project",
description: "Project for credit scoring team and associated models.",
id: "credit_scoring_aws",
registryPath: "/registry.db", // Changed to match what the test expects
},
],
}),
);
const creditHistoryRegistryPB = http.get("/registry.pb", () => {
return HttpResponse.arrayBuffer(registry.buffer);
});
const creditHistoryRegistryDB = http.get("/registry.db", () => {
return HttpResponse.arrayBuffer(registry.buffer);
});
export {
projectsListWithDefaultProject,
creditHistoryRegistryPB as creditHistoryRegistry,
creditHistoryRegistryDB,
};