mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 22:14:29 +09:00
31 lines
816 B
TypeScript
31 lines
816 B
TypeScript
import { type Instance } from "@webstudio-is/sdk";
|
|
import { deleteCssRulesByBreakpoint } from "./delete-css-rules-by-breakpoint";
|
|
|
|
describe("Delete breakpoint", () => {
|
|
test("basic", () => {
|
|
const instance: Instance = {
|
|
component: "Box",
|
|
id: "1",
|
|
cssRules: [{ breakpoint: "delete this", style: {} }],
|
|
children: [
|
|
{
|
|
component: "Box",
|
|
id: "2",
|
|
cssRules: [{ breakpoint: "do not delete", style: {} }],
|
|
children: [
|
|
{
|
|
component: "Box",
|
|
id: "3",
|
|
cssRules: [{ breakpoint: "delete this", style: {} }],
|
|
children: [],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
};
|
|
|
|
deleteCssRulesByBreakpoint(instance, "delete this");
|
|
expect(instance).toMatchSnapshot();
|
|
});
|
|
});
|