From 3ab9f0423e97af63da4bf6a13ffd786955bd5b3b Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 26 Oct 2023 21:55:55 +0200
Subject: refactor(hooks,providers): rewrite useAckee hook and AckeeProvider

---
 src/components/organisms/toolbar/settings.test.tsx | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

(limited to 'src/components/organisms/toolbar/settings.test.tsx')

diff --git a/src/components/organisms/toolbar/settings.test.tsx b/src/components/organisms/toolbar/settings.test.tsx
index 9dab407..66fa6a6 100644
--- a/src/components/organisms/toolbar/settings.test.tsx
+++ b/src/components/organisms/toolbar/settings.test.tsx
@@ -1,33 +1,35 @@
 import { describe, expect, it } from '@jest/globals';
-import { render, screen } from '../../../../tests/utils';
+import { render, screen as rtlScreen } from '../../../../tests/utils';
 import { Settings } from './settings';
 
+const doNothing = () => {
+  // do nothing
+};
+
 describe('Settings', () => {
   it('renders a button to open settings modal', () => {
     render(
       <Settings
-        ackeeStorageKey="ackee-tracking"
         motionStorageKey="reduced-motion"
         isActive={false}
-        setIsActive={() => null}
+        setIsActive={doNothing}
       />
     );
     expect(
-      screen.getByRole('checkbox', { name: 'Open settings' })
+      rtlScreen.getByRole('checkbox', { name: 'Open settings' })
     ).toBeInTheDocument();
   });
 
   it('renders a button to close settings modal', () => {
     render(
       <Settings
-        ackeeStorageKey="ackee-tracking"
         motionStorageKey="reduced-motion"
         isActive={true}
-        setIsActive={() => null}
+        setIsActive={doNothing}
       />
     );
     expect(
-      screen.getByRole('checkbox', { name: 'Close settings' })
+      rtlScreen.getByRole('checkbox', { name: 'Close settings' })
     ).toBeInTheDocument();
   });
 });
-- 
cgit v1.2.3

