From 0a034ee8d50a961950fbbde19ba172780b6a3f02 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 22:10:45 +0000 Subject: [PATCH] Automated linting update and features.json sync --- packages/studio-ui/src/components/UndoRedo.tsx | 5 ++--- .../studio-ui/tests/components/UndoRedo.test.tsx | 14 +++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/studio-ui/src/components/UndoRedo.tsx b/packages/studio-ui/src/components/UndoRedo.tsx index 956ad210b..14cb75bae 100644 --- a/packages/studio-ui/src/components/UndoRedo.tsx +++ b/packages/studio-ui/src/components/UndoRedo.tsx @@ -25,9 +25,8 @@ export default function UndoRedo(): JSX.Element { const handleUndoKeydown = useCallback( (event: KeyboardEvent) => { - const actionKey = platform.os.family === "OS X" - ? event.metaKey - : event.ctrlKey; + const actionKey = + platform.os.family === "OS X" ? event.metaKey : event.ctrlKey; if (actionKey && event.key === "z") { event.preventDefault(); undo(); diff --git a/packages/studio-ui/tests/components/UndoRedo.test.tsx b/packages/studio-ui/tests/components/UndoRedo.test.tsx index 1f2a57306..02bac24ab 100644 --- a/packages/studio-ui/tests/components/UndoRedo.test.tsx +++ b/packages/studio-ui/tests/components/UndoRedo.test.tsx @@ -11,10 +11,10 @@ jest.mock("platform", () => ({ __esModule: true, default: { os: { - family: null - } - } -})) + family: null, + }, + }, +})); describe("Undo/redo", () => { beforeEach(() => { @@ -57,8 +57,8 @@ describe("Undo/redo", () => { }); it("undoes last state update using control + z", async () => { - platform.os.family = "Windows" - + platform.os.family = "Windows"; + render(); expect(useStudioStore.getState().pages.activeComponentUUID).toBe( "searchbar-uuid" @@ -68,7 +68,7 @@ describe("Undo/redo", () => { }); it("undoes last state update using command + z", async () => { - platform.os.family = "OS X" + platform.os.family = "OS X"; render(); expect(useStudioStore.getState().pages.activeComponentUUID).toBe(