From cea80105ec1627d72148e6ed8a2b1da17851af6d Mon Sep 17 00:00:00 2001 From: Marcus Eide Date: Fri, 30 Apr 2021 15:25:51 +0200 Subject: [PATCH] Fix test and unused import Signed-off-by: Marcus Eide --- plugins/shortcuts/src/ShortcutItem.test.tsx | 2 +- plugins/shortcuts/src/api/LocalStoredShortcuts.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/shortcuts/src/ShortcutItem.test.tsx b/plugins/shortcuts/src/ShortcutItem.test.tsx index d32ec3d392..ffeec0cdc4 100644 --- a/plugins/shortcuts/src/ShortcutItem.test.tsx +++ b/plugins/shortcuts/src/ShortcutItem.test.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import { render, screen, fireEvent, waitFor } from '@testing-library/react'; +import { render, screen, waitFor } from '@testing-library/react'; import { ShortcutItem } from './ShortcutItem'; import { Shortcut } from './types'; import { SidebarContext } from '@backstage/core'; diff --git a/plugins/shortcuts/src/api/LocalStoredShortcuts.test.ts b/plugins/shortcuts/src/api/LocalStoredShortcuts.test.ts index 94f63f846a..7ca457fd39 100644 --- a/plugins/shortcuts/src/api/LocalStoredShortcuts.test.ts +++ b/plugins/shortcuts/src/api/LocalStoredShortcuts.test.ts @@ -69,7 +69,7 @@ describe('LocalStoredShortcuts', () => { const shortcut: Shortcut = { id: 'someid', title: 'title', url: '/url' }; const spy = jest.spyOn(storageApi, 'set'); - await shortcutApi.remove(shortcut); + await shortcutApi.remove(shortcut.id); expect(spy).toHaveBeenCalledWith('items', []); });