Skip to content

Commit

Permalink
add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
WickyNilliams committed Jan 30, 2024
1 parent 4b879e7 commit cc95995
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/openapi-typescript/test/schema-object.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ describe("Schema Object", () => {
const generated = transformSchemaObject({ nullable: true }, options);
expect(generated).toBe(`unknown`);
});

test("nullable object", () => {
const generated = transformSchemaObject({ nullable: true, type: "object" }, options);
expect(generated).toBe(`Record<string, unknown> | null`);
});
});

describe("schema composition", () => {
Expand Down

0 comments on commit cc95995

Please sign in to comment.