Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Feb 9, 2024
1 parent e76d594 commit 285b537
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/converter2/issues/gh2495.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export interface IAnimal {
name: number;
}

export interface IFish extends IAnimal {
maxDepth: number;
}

export class IFish implements IFish {}
11 changes: 11 additions & 0 deletions src/test/issues.c2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
} from "./programs";
import { TestLogger } from "./TestLogger";
import { getComment, getLinks, query, querySig } from "./utils";
import { DefaultTheme, PageEvent } from "..";

const base = getConverter2Base();
const app = getConverter2App();
Expand Down Expand Up @@ -1372,4 +1373,14 @@ describe("Issue Tests", () => {

equal(project.children[0].children?.map((c) => c.name), ["Options"]);
});

it("Does not crash when rendering recursive hierarchy, #2495", () => {
const project = convert();

const theme = new DefaultTheme(app.renderer);
const page = new PageEvent("hierarchy", project);
page.project = project;
const context = theme.getRenderContext(page);
context.hierarchyTemplate(page);
});
});

0 comments on commit 285b537

Please sign in to comment.