fix: lint errors (#20323)
This commit is contained in:
1 parent
01c16ad150
commit
7943a83e7d
16 files changed
+26
-26
No files matched your search
@@ -22,7 +22,7 @@ describe("defaultResponderForAppDir", () => {
|
||||
it("should return a JSON response when handler resolves with a result", async () => {
|
||||
const f = vi.fn().mockResolvedValue(NextResponse.json({ success: true }));
|
||||
const req = { method: "GET", url: "/api/test" } as unknown as NextRequest;
|
||||
const params = Promise.resolve<Params>({})
|
||||
const params = Promise.resolve<Params>({});
|
||||
|
||||
const response = await defaultResponderForAppDir(f)(req, { params });
|
||||
const json = await response.json();
|
||||
@@ -34,7 +34,7 @@ describe("defaultResponderForAppDir", () => {
|
||||
it("should return an empty JSON response when handler resolves with no result", async () => {
|
||||
const f = vi.fn().mockResolvedValue(null);
|
||||
const req = { method: "GET", url: "/api/test" } as unknown as NextRequest;
|
||||
const params = Promise.resolve<Params>({})
|
||||
const params = Promise.resolve<Params>({});
|
||||
|
||||
const response = await defaultResponderForAppDir(f)(req, { params });
|
||||
const json = await response.json();
|
||||
@@ -46,7 +46,7 @@ describe("defaultResponderForAppDir", () => {
|
||||
it("should respond with status code 409 for NoAvailableUsersFound", async () => {
|
||||
const f = vi.fn().mockRejectedValue(new Error(ErrorCode.NoAvailableUsersFound));
|
||||
const req = { method: "GET", url: "/api/test" } as unknown as NextRequest;
|
||||
const params = Promise.resolve<Params>({})
|
||||
const params = Promise.resolve<Params>({});
|
||||
|
||||
const response = await defaultResponderForAppDir(f)(req, { params });
|
||||
const json = await response.json();
|
||||
@@ -62,7 +62,7 @@ describe("defaultResponderForAppDir", () => {
|
||||
it("should respond with a 429 status code for rate limit errors", async () => {
|
||||
const f = vi.fn().mockRejectedValue(new TRPCError({ code: "TOO_MANY_REQUESTS" }));
|
||||
const req = { method: "POST", url: "/api/test" } as unknown as NextRequest;
|
||||
const params = Promise.resolve<Params>({})
|
||||
const params = Promise.resolve<Params>({});
|
||||
|
||||
const response = await defaultResponderForAppDir(f)(req, { params });
|
||||
const json = await response.json();
|
||||
|
||||
Reference in new issue
Block a user