Skip to content

Commit ef17461

Browse files
committed
test: fix bundleResponses tests
1 parent 3d2c8e3 commit ef17461

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/core/responses.test.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from "@jest/globals";
2-
import type { ResponseDefinition } from "~/types/response";
2+
import type { ResponseCollection } from "~/types/response";
33
import { addBadRequest, bundleResponses } from "./responses";
44

55
describe("addBadRequest", () => {
@@ -26,13 +26,11 @@ describe("addBadRequest", () => {
2626

2727
describe("bundleResponses", () => {
2828
it("should return an empty when no responses are provided", () => {
29-
const collection: Record<string, ResponseDefinition> = {};
30-
const result = bundleResponses(collection);
31-
expect(result).toEqual({});
29+
expect(bundleResponses({})).toEqual({});
3230
});
3331

3432
it("should return bundled responses with correct descriptions and resolved content", () => {
35-
const collection: Record<string, ResponseDefinition> = {
33+
const collection: ResponseCollection<Record<number, unknown>> = {
3634
200: { description: "Success", content: "SomeContent", isArray: false },
3735
404: { description: "Not Found", content: "SomeOtherContent", isArray: true },
3836
};

0 commit comments

Comments
 (0)