Files
webstudio/apps/builder/app/shared/breakpoints/group-breakpoints.test.ts
T
2024-11-13 14:39:17 +04:00

27 lines
625 B
TypeScript

import { describe, test, expect } from "vitest";
import { groupBreakpoints } from "./group-breakpoints";
describe("Group breakpoints", () => {
test("for ui", () => {
const initial = [
{ minWidth: 1920 },
{ minWidth: 1440 },
{ minWidth: 1280 },
{},
{ maxWidth: 991 },
{ maxWidth: 767 },
{ maxWidth: 479 },
];
const grouped = [
{ minWidth: 1920 },
{ minWidth: 1440 },
{ minWidth: 1280 },
{},
{ maxWidth: 991 },
{ maxWidth: 767 },
{ maxWidth: 479 },
];
expect(groupBreakpoints(initial)).toStrictEqual(grouped);
});
});