mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-08 13:05:08 +09:00
23 lines
706 B
TypeScript
23 lines
706 B
TypeScript
import { initialBreakpoints, type BaseBreakpoint } from "@webstudio-is/sdk";
|
|
import { sort } from "./sort";
|
|
|
|
describe("Breakpoints sorting for visual rendering", () => {
|
|
test("sort initial breakpoints", () => {
|
|
expect(sort(initialBreakpoints)).toStrictEqual(initialBreakpoints);
|
|
});
|
|
|
|
test("sort custom breakpoints", () => {
|
|
const breakpoints = [
|
|
{ label: "0", minWidth: 0 },
|
|
{ label: "3", minWidth: 3 },
|
|
{ label: "2", minWidth: 2 },
|
|
];
|
|
const sortedBreakpoints = [
|
|
{ label: "0", minWidth: 0 },
|
|
{ label: "2", minWidth: 2 },
|
|
{ label: "3", minWidth: 3 },
|
|
];
|
|
expect(sort<BaseBreakpoint>(breakpoints)).toStrictEqual(sortedBreakpoints);
|
|
});
|
|
});
|