Skip to content

Commit

Permalink
Make failing ts test
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodmane committed Dec 22, 2024
1 parent a2ce005 commit bc8f248
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ suite("types.ts", async () => {
function getObject(name: string): TopLevelIR {
const obj = map.get(name);
assert(obj);
return obj!;
return obj;
}
suite("basic", async () => {
for (const [obj_name, type_name] of [
Expand Down Expand Up @@ -100,4 +100,14 @@ suite("types.ts", async () => {
},
]);
});
await test("private_type_alias_1", () => {
const obj = getObject("typeIsPrivateTypeAlias1");
assert.strictEqual(obj.kind, "attribute");
assert.deepStrictEqual(joinType(obj.type), "{ a: number; b: string; }");
});
await test("private_type_alias_2", () => {
const obj = getObject("typeIsPrivateTypeAlias2");
assert.strictEqual(obj.kind, "attribute");
assert.deepStrictEqual(joinType(obj.type), "{ a: number; b: string; }");
});
});

0 comments on commit bc8f248

Please sign in to comment.