Files
Shortumation/webapp/src/components/DAGGraph/elements/math.test.ts
T
2022-07-09 19:22:04 -04:00

21 lines
327 B
TypeScript

import { updateBBox } from "./math";
test("compute bbox correctly", () => {
expect(
updateBBox(
[
{ x: 0, y: 0 },
{ x: 0, y: 0 },
],
{ x: 0, y: 70 },
{
height: 70,
width: 170,
}
)
).toStrictEqual([
{ x: 0, y: 0 },
{ x: 170, y: 140 },
]);
});