Skip to content

Commit

Permalink
test: Update mermaid tests based on renderer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SkepticMystic committed Apr 6, 2024
1 parent 947dcb7 commit 51ebd23
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/utils/mermaid.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ describe("from_edges", () => {
test("should create a mermaid flowchart from edges", (t) => {
t.expect(
Mermaid.from_edges([
_mock_edge("a", "b", { explicit: true, field: "up" }),
_mock_edge("b", "c", { explicit: false, field: "down" }),
_mock_edge("a.md", "b.md", { explicit: true, field: "up" }),
_mock_edge("b.md", "c.md", { explicit: false, field: "down" }),
]).trim(),
).toBe(
`
%%{init: {"flowchart": {"defaultRenderer": "dagre"}} }%%
flowchart LR
\ta["a"] -->|up| b["b"]
\tb["b"] -.->|down| c["c"]`.trimStart(),
\ta.md("a") -->|up| b.md("b")
\tb.md("b") -.->|down| c.md("c")`.trimStart(),
);
});
});

0 comments on commit 51ebd23

Please sign in to comment.