mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-12-04 22:31:33 +09:00
27 lines
625 B
TypeScript
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);
|
|
});
|
|
});
|