Skip to content

Commit

Permalink
Add new test case for range type
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonieaj committed Jun 19, 2024
1 parent 8cea247 commit 139c9df
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions memory-viz/src/tests/draw.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -749,4 +749,20 @@ describe("draw function", () => {
const svg: String = m.serializeSVG();
expect(svg).toMatchSnapshot();
});

it("renders range object", () => {
const objects: Array<Object> = [
{
type: "range",
id: 42,
value: "range(1, 5)",
},
];
const m: InstanceType<typeof MemoryModel> = draw(objects, true, {
width: 1300,
roughjs_config: { options: { seed: 12345 } },
});
const svg: String = m.serializeSVG();
expect(svg).toMatchSnapshot();
});
});

0 comments on commit 139c9df

Please sign in to comment.