Skip to content

Commit

Permalink
fix: test that illustrates the bug I've encountered and fails
Browse files Browse the repository at this point in the history
  • Loading branch information
collink committed Aug 1, 2024
1 parent e87d22c commit 97719b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/common.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ describe("common", () => {
const result = getShortType(type);
expect(result).toBe("MyType");
});

test("json", () => {
const type =
'{ import1?: import("/path/to/import1").Import1; import2: import("/path/to/import2").Import2; import3: import("/path/to/import3").Import3; }';
const result = getShortType(type);
expect(result).toBe(
"{ import1?: Import1; import2: Import2; import3: Import3; }",
);
});
});

test("formatOptions - converts string boolean to boolean (false)", () => {
Expand Down

0 comments on commit 97719b3

Please sign in to comment.