test(frontend): satisfy HttpResponse.json JsonBodyType constraint
This commit is contained in:
@@ -34,10 +34,10 @@ describe("ConnectionsPage", () => {
|
||||
mswServer.use(
|
||||
http.get("/api/connection-providers", () => HttpResponse.json(providers)),
|
||||
http.get("/api/connections", () =>
|
||||
HttpResponse.json(created ? [created] : [])),
|
||||
HttpResponse.json((created ? [created] : []) as never)),
|
||||
http.post("/api/connections", async ({ request }) => {
|
||||
created = { id: "c1", ...(await request.json() as object) };
|
||||
return HttpResponse.json(created, { status: 201 });
|
||||
return HttpResponse.json(created as never, { status: 201 });
|
||||
}),
|
||||
);
|
||||
renderWithProviders(<ConnectionsPage />);
|
||||
|
||||
@@ -33,7 +33,7 @@ describe("WorkflowsPage", () => {
|
||||
id: "new", name: body.name, active: false, graph: emptyGraph,
|
||||
createdAt: "x", updatedAt: "x",
|
||||
}];
|
||||
return HttpResponse.json(workflows[0], { status: 201 });
|
||||
return HttpResponse.json(workflows[0] as never, { status: 201 });
|
||||
}),
|
||||
);
|
||||
renderWithProviders(<WorkflowsPage />);
|
||||
|
||||
Reference in New Issue
Block a user