test: add TS checks and fix issues
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
import {
|
||||
http,
|
||||
HttpResponse,
|
||||
HttpResponseResolver,
|
||||
PathParams
|
||||
} from "msw";
|
||||
import { setupServer } from "msw/node";
|
||||
import { http, HttpResponse, HttpResponseResolver, PathParams } from "msw";
|
||||
import appsFixtures from "./apps.fixtures.json";
|
||||
|
||||
export const CAPROVER_TEST_DOMAIN = "caprover.test";
|
||||
@@ -14,7 +19,7 @@ const withAuth = (resolver: HttpResponseResolver): HttpResponseResolver => {
|
||||
headers.get("x-namespace") !== "captain" ||
|
||||
headers.get("x-captain-auth") !== TEST_TOKEN
|
||||
) {
|
||||
return new HttpResponse("", { status: 401 });
|
||||
return HttpResponse.json({}, { status: 401 });
|
||||
}
|
||||
return resolver(input);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user