Update context passed in Shortcuts.test.tsx and ShortcutItem.test.tsx

Signed-off-by: hiba-aldalaty <hibaaldalaty@gmail.com>
This commit is contained in:
hiba-aldalaty
2021-11-04 14:08:29 +00:00
parent a6cf7598a1
commit ddf4617111
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -37,7 +37,9 @@ describe('ShortcutItem', () => {
it('displays the shortcut', async () => {
await renderInTestApp(
<SidebarContext.Provider value={{ isOpen: true, setIsOpen: () => {} }}>
<SidebarContext.Provider
value={{ isOpen: true, handleOpen: () => {}, handleClose: () => {} }}
>
<ShortcutItem api={api} shortcut={shortcut} />
</SidebarContext.Provider>,
);
+3 -1
View File
@@ -30,7 +30,9 @@ const apis = ApiRegistry.from([
describe('Shortcuts', () => {
it('displays an add button', async () => {
await renderInTestApp(
<SidebarContext.Provider value={{ isOpen: true, setIsOpen: () => {} }}>
<SidebarContext.Provider
value={{ isOpen: true, handleOpen: () => {}, handleClose: () => {} }}
>
<ApiProvider apis={apis}>
<Shortcuts />
</ApiProvider>