Skip to content

Commit 8fc4386

Browse files
committed
add test case for non strict mode
1 parent c62048a commit 8fc4386

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/testing/basic.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ describe("transpiling basic types", () => {
5757
"export type T = number | string | Record<string, boolean>",
5858
"from typing_extensions import Dict, Union\n\nT = Union[str,float,Dict[str,bool]]",
5959
],
60+
[
61+
"export type T = number | undefined",
62+
// without strict mode the `undefined` gets lost here
63+
"T = float",
64+
],
6065
])("transpiles %p to %p", async (input, expected) => {
6166
const result = await transpileString(input);
6267
expect(result).toEqual(expected);

0 commit comments

Comments
 (0)