import { flexLayout } from "../src/common/utils.js"; describe("flexLayout", () => { it("should work with row & col layouts", () => { const layout = flexLayout({ items: ["1", "2"], gap: 60, }); expect(layout).toStrictEqual([ `1`, `2`, ]); const columns = flexLayout({ items: ["1", "2"], gap: 60, direction: "column", }); expect(columns).toStrictEqual([ `1`, `2`, ]); }); it("should work with sizes", () => { const layout = flexLayout({ items: [ "1", "2", "3", "4", ], gap: 20, sizes: [200, 100, 55, 25], }); expect(layout).toStrictEqual([ `1`, `2`, `3`, `4`, ]); }); });