diff --git a/.eslintrc.js b/.eslintrc.js
index ee2350f238c0b9c16372bf82e8cf93fc2a1d88cf..808f52d66e55d557fdf57581b8a0b51431102612 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -29,8 +29,15 @@ module.exports = {
         '@typescript-eslint/no-var-requires': 'off',
       },
     },
+    {
+      files: ['**/*.spec.{ts,tsx}'],
+      extends: ['plugin:jest/recommended'],
+      rules: {
+        'jest/no-mocks-import': 0,
+      },
+    },
   ],
-  plugins: ['@typescript-eslint', 'react', 'react-hooks'],
+  plugins: ['@typescript-eslint', 'react', 'react-hooks', 'jest'],
   parser: '@typescript-eslint/parser', // Specifies the ESLint parser
   parserOptions: {
     ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 9b958d5bd63a6b6db81fd5b50958da2456d550ad..e0492b20994d9ddccd35028d4ca65a1fec28ff0d 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -47,6 +47,7 @@
   "sonarlint.connectedMode.project": {
     "projectKey": "ecolyo"
   },
+  "gitlens.remotes": [{ "type": "GitLab", "domain": "forge.grandlyon.com" }],
   "cSpell.language": "fr,en",
   "cSpell.words": [
     "authform",
diff --git a/package.json b/package.json
index c78c84c4f21da8cd6df467b5fd1a0b3bac3de072..973f9bc6b2c122a59dbc4f7101c96c0679aec301 100644
--- a/package.json
+++ b/package.json
@@ -115,8 +115,9 @@
     "enzyme": "3.11.0",
     "enzyme-adapter-react-16": "1.15.6",
     "enzyme-to-json": "^3.6.2",
-    "eslint": "^8.36.0",
+    "eslint": "^8.49.0",
     "eslint-config-prettier": "^8.8.0",
+    "eslint-plugin-jest": "^27.2.3",
     "eslint-plugin-prettier": "^4.2.1",
     "eslint-plugin-react": "7.32.2",
     "eslint-plugin-react-hooks": "^4.6.0",
diff --git a/src/components/Action/ActionBegin/ActionBegin.spec.tsx b/src/components/Action/ActionBegin/ActionBegin.spec.tsx
index 2c05f3c115ef1df48b59bb4b52d1e942d8d88b7e..68c77e405bf58032d455c5e847fa934e0987fa9b 100644
--- a/src/components/Action/ActionBegin/ActionBegin.spec.tsx
+++ b/src/components/Action/ActionBegin/ActionBegin.spec.tsx
@@ -69,7 +69,7 @@ describe('ActionBegin component', () => {
     await waitForComponentToPaint(wrapper)
     expect(wrapper.find('.action-title').text()).toBe('Coup de vent')
   })
-  it('should render chosen action ', async () => {
+  it('should render chosen action', async () => {
     const store = createMockEcolyoStore({
       global: { ...mockGlobalState, fluidTypes: [0, 1, 2] },
       profile: mockProfileState,
@@ -87,7 +87,7 @@ describe('ActionBegin component', () => {
     await waitForComponentToPaint(wrapper)
     expect(wrapper.find(ActionBegin).exists()).toBeTruthy()
   })
-  it('should open launch Modal ', async () => {
+  it('should open launch Modal', async () => {
     const store = createMockEcolyoStore({
       global: { ...mockGlobalState, fluidTypes: [0, 1, 2] },
       profile: mockProfileState,
@@ -107,7 +107,7 @@ describe('ActionBegin component', () => {
     expect(wrapper.find(ActionModal).exists()).toBeTruthy()
     expect(wrapper.find(ActionModal).prop('open')).toBeTruthy()
   })
-  it('should go to the list ', async () => {
+  it('should go to the list', async () => {
     const store = createMockEcolyoStore({
       global: { ...mockGlobalState, fluidTypes: [0, 1, 2] },
       profile: mockProfileState,
diff --git a/src/components/Action/ActionDone/ActionDone.spec.tsx b/src/components/Action/ActionDone/ActionDone.spec.tsx
index 0716cc3b749132ea1d63f5c3bb37eb61b6bc8fdf..768da199887dc48d1a6ca651b3a44471b085fb8b 100644
--- a/src/components/Action/ActionDone/ActionDone.spec.tsx
+++ b/src/components/Action/ActionDone/ActionDone.spec.tsx
@@ -45,6 +45,6 @@ describe('ActionDone component', () => {
     )
     wrapper.find(Button).first().simulate('click')
     await waitForComponentToPaint(wrapper)
-    expect(updateChallengeSpy).toBeCalledTimes(1)
+    expect(updateChallengeSpy).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/Action/ActionList/ActionList.spec.tsx b/src/components/Action/ActionList/ActionList.spec.tsx
index e243a3a28008104d95de3620c8b498994cf12361..aad7a7a4c8c1a3be11d95e0535f18849194a303b 100644
--- a/src/components/Action/ActionList/ActionList.spec.tsx
+++ b/src/components/Action/ActionList/ActionList.spec.tsx
@@ -7,6 +7,7 @@ import {
   mockChallengeState,
   mockProfileState,
 } from 'tests/__mocks__/store'
+import { waitForComponentToPaint } from 'tests/__mocks__/testUtils'
 import ActionCard from '../ActionCard/ActionCard'
 import ActionList from './ActionList'
 
@@ -21,7 +22,7 @@ jest.mock('services/action.service', () => {
 })
 
 describe('ActionList component', () => {
-  it('should be rendered correctly', () => {
+  it('should be rendered correctly', async () => {
     mockGetDefaultActions.mockResolvedValueOnce(defaultEcogestureData)
     const store = createMockEcolyoStore({
       challenge: { ...mockChallengeState },
@@ -33,6 +34,7 @@ describe('ActionList component', () => {
         <ActionList setSelectedAction={jest.fn()} setShowList={jest.fn()} />
       </Provider>
     )
-    expect(wrapper.find(ActionCard).exists())
+    await waitForComponentToPaint(wrapper)
+    expect(wrapper.find(ActionCard)).toBeTruthy()
   })
 })
diff --git a/src/components/Action/ActionModal/ActionModal.spec.tsx b/src/components/Action/ActionModal/ActionModal.spec.tsx
index 9f54ea0a10ff088b54107d22b7f92b382aa26b64..4507b4c42146b6cae0d2cf481ba60fee067887fb 100644
--- a/src/components/Action/ActionModal/ActionModal.spec.tsx
+++ b/src/components/Action/ActionModal/ActionModal.spec.tsx
@@ -56,6 +56,6 @@ describe('ActionModal component', () => {
     )
     wrapper.find(Button).first().simulate('click')
     await waitForComponentToPaint(wrapper)
-    expect(updateChallengeSpy).toBeCalledTimes(1)
+    expect(updateChallengeSpy).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/Analysis/AnalysisView.spec.tsx b/src/components/Analysis/AnalysisView.spec.tsx
index 6045ccf904a12b96be67fcb3c24e77c91ea44270..6c2515b5bddbd28e139821fb3c3f6486befa8453 100644
--- a/src/components/Analysis/AnalysisView.spec.tsx
+++ b/src/components/Analysis/AnalysisView.spec.tsx
@@ -67,11 +67,11 @@ describe('AnalysisView component', () => {
     expect(wrapper.find('mock-header').exists()).toBeTruthy()
     expect(wrapper.find('mock-datenavigator').exists()).toBeTruthy()
     expect(wrapper.find('mock-monthlyanalysis').exists()).toBeTruthy()
-    expect(updateProfileSpy).toBeCalledTimes(1)
+    expect(updateProfileSpy).toHaveBeenCalledTimes(1)
     expect(updateProfileSpy).toHaveBeenCalledWith({
       haveSeenLastAnalysis: true,
     })
-    expect(toggleAnalysisNotificationSpy).toBeCalledTimes(1)
+    expect(toggleAnalysisNotificationSpy).toHaveBeenCalledTimes(1)
     expect(toggleAnalysisNotificationSpy).toHaveBeenCalledWith(false)
   })
 })
diff --git a/src/components/Analysis/ProfileComparator/ProfileComparator.spec.tsx b/src/components/Analysis/ProfileComparator/ProfileComparator.spec.tsx
index e3d8ffd7a01147f9dda10e4b72c7031014aec587..8bb603abffedaf7fcc092ff60504c77e2440f05c 100644
--- a/src/components/Analysis/ProfileComparator/ProfileComparator.spec.tsx
+++ b/src/components/Analysis/ProfileComparator/ProfileComparator.spec.tsx
@@ -205,6 +205,6 @@ describe('AnalysisConsumption component', () => {
     )
     await waitForComponentToPaint(wrapper)
     wrapper.find(Button).first().simulate('click')
-    expect(mockedNavigate).toBeCalledWith('/profileType')
+    expect(mockedNavigate).toHaveBeenCalledWith('/profileType')
   })
 })
diff --git a/src/components/Challenge/ChallengeCardDone/ChallengeCardDone.spec.tsx b/src/components/Challenge/ChallengeCardDone/ChallengeCardDone.spec.tsx
index 22af2203e4cc13b5adafe0770bf075b5c54b83a4..21a0b674c6d80993b88513fccaa4060c288f00e6 100644
--- a/src/components/Challenge/ChallengeCardDone/ChallengeCardDone.spec.tsx
+++ b/src/components/Challenge/ChallengeCardDone/ChallengeCardDone.spec.tsx
@@ -49,11 +49,11 @@ describe('ChallengeCardDone component', () => {
       )
       wrapper.find(Button).last().simulate('click')
       await waitForComponentToPaint(wrapper)
-      expect(mockDispatch).toBeCalledTimes(1)
-      expect(mockDispatch).toBeCalledWith({
+      expect(mockDispatch).toHaveBeenCalledTimes(1)
+      expect(mockDispatch).toHaveBeenCalledWith({
         type: 'challenge/updateUserChallengeList',
       })
-      expect(mockUpdateUserChallenge).toBeCalledTimes(1)
+      expect(mockUpdateUserChallenge).toHaveBeenCalledTimes(1)
     })
     it('should not reset challenge if another challenge is on going', async () => {
       mockAppDispatch.mockImplementationOnce(() => mockDispatch)
@@ -69,8 +69,8 @@ describe('ChallengeCardDone component', () => {
       )
       wrapper.find(Button).last().simulate('click')
       await waitForComponentToPaint(wrapper)
-      expect(mockDispatch).toBeCalledTimes(0)
-      expect(mockUpdateUserChallenge).toBeCalledTimes(0)
+      expect(mockDispatch).toHaveBeenCalledTimes(0)
+      expect(mockUpdateUserChallenge).toHaveBeenCalledTimes(0)
     })
     it('should be primary button is challenge is lost', async () => {
       const wrapper = mount(
diff --git a/src/components/Challenge/ChallengeCardLast/ChallengeCardLast.spec.tsx b/src/components/Challenge/ChallengeCardLast/ChallengeCardLast.spec.tsx
index b711bf01d054b954d88b651e55d3f93c1d70d6fe..7cd4d37df410927a86fa7683458f2d2a8465521e 100644
--- a/src/components/Challenge/ChallengeCardLast/ChallengeCardLast.spec.tsx
+++ b/src/components/Challenge/ChallengeCardLast/ChallengeCardLast.spec.tsx
@@ -17,7 +17,7 @@ describe('ChallengeCardLast component', () => {
 
     const wrapper = mount(<ChallengeCardLast />)
     wrapper.find('.btn_lastCard').first().simulate('click')
-    expect(window.open).toBeCalledTimes(1)
+    expect(window.open).toHaveBeenCalledTimes(1)
     expect(global.open).toHaveBeenCalledWith(
       `${__SAU_IDEA_DIRECT_LINK__}?version=0.0.0`
     )
diff --git a/src/components/Charts/Bar.spec.tsx b/src/components/Charts/Bar.spec.tsx
index 85e8adfc9955a7ebd369557b6e4e2f0f23015a3f..e1de4c716c79e7bca1c5baa56278d45bbf06960f 100644
--- a/src/components/Charts/Bar.spec.tsx
+++ b/src/components/Charts/Bar.spec.tsx
@@ -130,7 +130,7 @@ describe('Bar component test', () => {
       </Provider>
     )
     wrapper.find('rect').first().simulate('click')
-    expect(setSelectedDateSpy).toBeCalledTimes(1)
+    expect(setSelectedDateSpy).toHaveBeenCalledTimes(1)
     expect(setSelectedDateSpy).toHaveBeenCalledWith(
       graphData.actualData[0].date
     )
diff --git a/src/components/Consumption/ConsumptionDetails/ConsumptionDetails.spec.tsx b/src/components/Consumption/ConsumptionDetails/ConsumptionDetails.spec.tsx
index 6268e2f341d3e85908aa8a1e2b822d78581302a6..939ab0b35537bc2dce47ce8195a6ae29ec30f0db 100644
--- a/src/components/Consumption/ConsumptionDetails/ConsumptionDetails.spec.tsx
+++ b/src/components/Consumption/ConsumptionDetails/ConsumptionDetails.spec.tsx
@@ -20,7 +20,7 @@ describe('ConsumptionDetails component', () => {
     expect(toJson(wrapper)).toMatchSnapshot()
   })
 
-  it('should not render connection card ', () => {
+  it('should not render connection card', () => {
     const wrapper = mount(
       <Provider store={store}>
         <ConsumptionDetails fluidType={FluidType.MULTIFLUID} />
@@ -28,7 +28,7 @@ describe('ConsumptionDetails component', () => {
     )
     expect(wrapper.contains('.fluidcard-link')).toBeFalsy()
   })
-  it('should render one connection card ', () => {
+  it('should render one connection card', () => {
     const wrapper = mount(
       <Provider store={store}>
         <ConsumptionDetails fluidType={FluidType.MULTIFLUID} />
diff --git a/src/components/Consumption/ConsumptionView.spec.tsx b/src/components/Consumption/ConsumptionView.spec.tsx
index bb036742c1c30ebb6c91a7fb3761642d9cd8b7f3..75ce5755c9f38d4c15dd4d29afa7687580e14fc0 100644
--- a/src/components/Consumption/ConsumptionView.spec.tsx
+++ b/src/components/Consumption/ConsumptionView.spec.tsx
@@ -132,7 +132,7 @@ describe('ConsumptionView component', () => {
         <ConsumptionView fluidType={FluidType.GAS} />
       </Provider>
     )
-    expect(setCurrentTimeStepSpy).toBeCalledTimes(1)
+    expect(setCurrentTimeStepSpy).toHaveBeenCalledTimes(1)
     expect(setCurrentTimeStepSpy).toHaveBeenCalledWith(TimeStep.WEEK)
   })
 
diff --git a/src/components/ConsumptionVisualizer/DataloadNoValue.spec.tsx b/src/components/ConsumptionVisualizer/DataloadNoValue.spec.tsx
index 28f63e5570ce5e0d5eb6cd4f2381ca35bd74a17d..8d9f0618371c50cd34c33e139e928162ce35aa4d 100644
--- a/src/components/ConsumptionVisualizer/DataloadNoValue.spec.tsx
+++ b/src/components/ConsumptionVisualizer/DataloadNoValue.spec.tsx
@@ -109,6 +109,6 @@ describe('DataloadNoValue component', () => {
       />
     )
     wrapper.find('.dataloadvisualizer-content').simulate('click')
-    expect(mockSetActive).toBeCalledWith(true)
+    expect(mockSetActive).toHaveBeenCalledWith(true)
   })
 })
diff --git a/src/components/ConsumptionVisualizer/DataloadSectionValue.spec.tsx b/src/components/ConsumptionVisualizer/DataloadSectionValue.spec.tsx
index 7992098174f530db86f4248ec920195f69afc53f..f29778adad0504ebdeef92f847779da38c684715 100644
--- a/src/components/ConsumptionVisualizer/DataloadSectionValue.spec.tsx
+++ b/src/components/ConsumptionVisualizer/DataloadSectionValue.spec.tsx
@@ -105,7 +105,7 @@ describe('DataloadSectionValue component', () => {
         />
       )
       wrapper.find('.estimated').simulate('click')
-      expect(mockToggleEstimationModal).toBeCalled()
+      expect(mockToggleEstimationModal).toHaveBeenCalled()
     })
   })
 })
diff --git a/src/components/Duel/DuelView.spec.tsx b/src/components/Duel/DuelView.spec.tsx
index 80a35498f7563ae764171373d2f3653ec22c9fc3..9908eb501c43b047fdac9f60389f55d9c344847e 100644
--- a/src/components/Duel/DuelView.spec.tsx
+++ b/src/components/Duel/DuelView.spec.tsx
@@ -77,7 +77,7 @@ describe('DuelView component', () => {
     expect(wrapper.find(DuelError).exists()).toBeTruthy()
   })
 
-  it('should be rendered with DuelError component when current challenge with state != duel ', () => {
+  it('should be rendered with DuelError component when current challenge with state != duel', () => {
     const updatedUserChallenge = {
       ...userChallengeData[1],
       state: UserChallengeState.ONGOING,
diff --git a/src/components/Ecogesture/EcogestureInitModal/EcogestureInitModal.spec.tsx b/src/components/Ecogesture/EcogestureInitModal/EcogestureInitModal.spec.tsx
index 9f527a984e5c9e729de3761d3035f2399a8dac88..7f04115005180020e5dbc90cd4dda9735670ef71 100644
--- a/src/components/Ecogesture/EcogestureInitModal/EcogestureInitModal.spec.tsx
+++ b/src/components/Ecogesture/EcogestureInitModal/EcogestureInitModal.spec.tsx
@@ -17,7 +17,7 @@ describe('EcogestureInitModal component', () => {
     )
     expect(toJson(wrapper)).toMatchSnapshot()
   })
-  it('should close modal ', () => {
+  it('should close modal', () => {
     const wrapper = mount(
       <EcogestureInitModal
         open={true}
diff --git a/src/components/Ecogesture/EcogestureList/EcogestureList.spec.tsx b/src/components/Ecogesture/EcogestureList/EcogestureList.spec.tsx
index e51a18972c6a03163e26b0a59c5d9b973da3f9a9..10780f017df3e596dc1cbbf8c8d4ed4c73fb1f2d 100644
--- a/src/components/Ecogesture/EcogestureList/EcogestureList.spec.tsx
+++ b/src/components/Ecogesture/EcogestureList/EcogestureList.spec.tsx
@@ -62,7 +62,7 @@ describe('EcogesturesList component', () => {
     wrapper.find(Button).first().simulate('click')
     expect(wrapper.find('.filter-menu').exists()).toBeTruthy()
     wrapper.find(MenuItem).at(1).simulate('click')
-    expect(updateEcogestureFilter).toBeCalledTimes(1)
+    expect(updateEcogestureFilter).toHaveBeenCalledTimes(1)
   })
 
   it('should display the selection section', async () => {
diff --git a/src/components/EcogestureForm/EcogestureFormEquipment/EcogestureFormEquipment.spec.tsx b/src/components/EcogestureForm/EcogestureFormEquipment/EcogestureFormEquipment.spec.tsx
index 102b0d4b3b40bf4ec8a6146657b06d9b213ef254..91a4fd40e0e99c7103a647eb7abb129dbfc3ec4a 100644
--- a/src/components/EcogestureForm/EcogestureFormEquipment/EcogestureFormEquipment.spec.tsx
+++ b/src/components/EcogestureForm/EcogestureFormEquipment/EcogestureFormEquipment.spec.tsx
@@ -45,7 +45,7 @@ describe('EcogestureFormEquipment component', () => {
     wrapper.find('.item-eq').first().simulate('change')
     await waitForComponentToPaint(wrapper)
 
-    expect(wrapper.find('.item-eq').first().hasClass('checked')).toBeTruthy
+    expect(wrapper.find('.item-eq').first().hasClass('checked')).toBeTruthy()
     wrapper.find('.checked').first().simulate('change')
     await waitForComponentToPaint(wrapper)
     expect(wrapper.find('.item-eq').first().hasClass('checked')).toBeFalsy()
diff --git a/src/components/Feedback/FeedbackModal.spec.tsx b/src/components/Feedback/FeedbackModal.spec.tsx
index 9d92f7ab09c2fa5be1a428d01eff76b1718c3b00..8c7520ace692c3c63def7c746685546311306ebd 100644
--- a/src/components/Feedback/FeedbackModal.spec.tsx
+++ b/src/components/Feedback/FeedbackModal.spec.tsx
@@ -63,7 +63,7 @@ describe('FeedbackModal component', () => {
         </Provider>
       )
       wrapper.find('.btn-highlight').first().simulate('click')
-      expect(window.open).toBeCalledTimes(1)
+      expect(window.open).toHaveBeenCalledTimes(1)
       expect(global.open).toHaveBeenCalledWith(`${__SAU_LINK__}?version=0.0.0`)
     })
   })
diff --git a/src/components/FluidChart/TimeStepSelector/TimeStepSelector.spec.tsx b/src/components/FluidChart/TimeStepSelector/TimeStepSelector.spec.tsx
index 2264ab47644e03aa5a944a1974c56eea05e30711..25c2672cc2540a55bcbb7044a777cb6cf651487e 100644
--- a/src/components/FluidChart/TimeStepSelector/TimeStepSelector.spec.tsx
+++ b/src/components/FluidChart/TimeStepSelector/TimeStepSelector.spec.tsx
@@ -77,9 +77,9 @@ describe('TimeStepSelector component', () => {
       </Provider>
     )
     wrapper.find('#day').first().simulate('click')
-    expect(setCurrentTimeStepSpy).toBeCalledTimes(1)
+    expect(setCurrentTimeStepSpy).toHaveBeenCalledTimes(1)
     expect(setCurrentTimeStepSpy).toHaveBeenCalledWith(TimeStep.DAY)
-    expect(setCurrentIndexSpy).toBeCalledTimes(1)
+    expect(setCurrentIndexSpy).toHaveBeenCalledTimes(1)
   })
   it('should go to todays day with timestep week', () => {
     const store = createMockEcolyoStore({
@@ -96,9 +96,9 @@ describe('TimeStepSelector component', () => {
       </Provider>
     )
     wrapper.find(Button).first().simulate('click')
-    expect(setCurrentTimeStepSpy).toBeCalledTimes(1)
+    expect(setCurrentTimeStepSpy).toHaveBeenCalledTimes(1)
     expect(setCurrentTimeStepSpy).toHaveBeenCalledWith(TimeStep.WEEK)
-    expect(setCurrentIndexSpy).toBeCalledTimes(2)
-    expect(setSelectedDateSpy).toBeCalledTimes(1)
+    expect(setCurrentIndexSpy).toHaveBeenCalledTimes(2)
+    expect(setSelectedDateSpy).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/Options/ExportData/Modals/exportDoneModal.spec.tsx b/src/components/Options/ExportData/Modals/exportDoneModal.spec.tsx
index 6cb90a0e016525de85d2dac06908ed39551c8344..a9e1c7f46cf09434129c0aebb7678baf80925d45 100644
--- a/src/components/Options/ExportData/Modals/exportDoneModal.spec.tsx
+++ b/src/components/Options/ExportData/Modals/exportDoneModal.spec.tsx
@@ -26,7 +26,7 @@ describe('exportDoneModal component', () => {
 
   it('should display error message', () => undefined)
 
-  it('should close modal ', () => {
+  it('should close modal', () => {
     const wrapper = mount(
       <Provider store={store}>
         <ExportDoneModal
diff --git a/src/components/Options/ExportData/Modals/exportLoadingModal.spec.tsx b/src/components/Options/ExportData/Modals/exportLoadingModal.spec.tsx
index c25414ec7dda48cecacb4e9bf17a59ba8695d948..aeb7d672b21ee18090c1b972ac88de02543533b2 100644
--- a/src/components/Options/ExportData/Modals/exportLoadingModal.spec.tsx
+++ b/src/components/Options/ExportData/Modals/exportLoadingModal.spec.tsx
@@ -28,7 +28,7 @@ describe('ExportLoadingModal component', () => {
     expect(toJson(wrapper)).toMatchSnapshot()
   })
 
-  it('should cancel download ', () => {
+  it('should cancel download', () => {
     const wrapper = mount(
       <Provider store={store}>
         <ExportLoadingModal
diff --git a/src/components/Options/ExportData/Modals/exportStartModal.spec.tsx b/src/components/Options/ExportData/Modals/exportStartModal.spec.tsx
index 2857c5f1235e615589ca6622159e30f00f606245..f72defa44b9241920678f0a7e3b8be51a8f561ac 100644
--- a/src/components/Options/ExportData/Modals/exportStartModal.spec.tsx
+++ b/src/components/Options/ExportData/Modals/exportStartModal.spec.tsx
@@ -25,7 +25,7 @@ describe('exportStartModal component', () => {
     expect(toJson(wrapper)).toMatchSnapshot()
   })
 
-  it('should close modal ', () => {
+  it('should close modal', () => {
     const wrapper = mount(
       <Provider store={store}>
         <ExportStartModal
diff --git a/src/components/Options/ReportOptions/ReportOptions.spec.tsx b/src/components/Options/ReportOptions/ReportOptions.spec.tsx
index 7453ae5807b74ace9fb9c815221a1bf67e2555ba..8794bd7e8cf8a8e05393ca4e916b8b6f9f6bba09 100644
--- a/src/components/Options/ReportOptions/ReportOptions.spec.tsx
+++ b/src/components/Options/ReportOptions/ReportOptions.spec.tsx
@@ -42,7 +42,7 @@ describe('ReportOptions component', () => {
       </Provider>
     )
     wrapper.find(Button).first().simulate('click')
-    expect(updateProfileSpy).toBeCalledTimes(1)
+    expect(updateProfileSpy).toHaveBeenCalledTimes(1)
     expect(updateProfileSpy).toHaveBeenCalledWith({
       sendAnalysisNotification: false,
     })
@@ -56,7 +56,7 @@ describe('ReportOptions component', () => {
       </Provider>
     )
     wrapper.find(Button).first().simulate('click')
-    expect(updateProfileSpy).toBeCalledTimes(1)
+    expect(updateProfileSpy).toHaveBeenCalledTimes(1)
     expect(updateProfileSpy).toHaveBeenCalledWith({
       sendAnalysisNotification: true,
     })
@@ -85,7 +85,7 @@ describe('ReportOptions component', () => {
       .find('input')
       .first()
       .simulate('change', { target: { checked: 'true' } })
-    expect(updateProfileSpy).toBeCalledTimes(1)
+    expect(updateProfileSpy).toHaveBeenCalledTimes(1)
     expect(updateProfileSpy).toHaveBeenCalledWith({
       sendConsumptionAlert: true,
     })
diff --git a/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx b/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx
index b05a3a8f6def8a18aa4d9406bef1677bc694215c..7c5b860e950deeebbb365a6d46a5c41964ac2064 100644
--- a/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx
+++ b/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx
@@ -80,12 +80,11 @@ describe('QuizCustomQuestionContent component', () => {
       </Provider>
     )
     const answer = questionEntity.answers[0].answerLabel
-    expect(
-      wrapper
-        .find({ type: 'radio' })
-        .at(0)
-        .simulate('change', { target: { value: answer } })
-    )
+    wrapper
+      .find({ type: 'radio' })
+      .at(0)
+      .simulate('change', { target: { value: answer } })
+
     expect(wrapper.find(Button).exists()).toBeTruthy()
     wrapper.find('.btn-secondary-negative').forEach(node => {
       node.simulate('click')
diff --git a/src/components/WelcomeModal/WelcomeModal.spec.tsx b/src/components/WelcomeModal/WelcomeModal.spec.tsx
index 9d6706a61c940ef8303dc14fc44d19d71a7da353..a4fa5b4211cebcce60fbb4f3fcb04c11a6fb4231 100644
--- a/src/components/WelcomeModal/WelcomeModal.spec.tsx
+++ b/src/components/WelcomeModal/WelcomeModal.spec.tsx
@@ -71,7 +71,7 @@ describe('WelcomeModal component', () => {
       </Provider>
     )
     component.find(Button).first().simulate('click')
-    expect(mockSendMail).toBeCalled()
+    expect(mockSendMail).toHaveBeenCalled()
     expect(updateProfileSpy).toHaveBeenCalledWith({
       isFirstConnection: false,
       onboarding: {
@@ -87,7 +87,7 @@ describe('WelcomeModal component', () => {
       </Provider>
     )
     component.find(IconButton).first().simulate('click')
-    expect(mockSendMail).toBeCalled()
+    expect(mockSendMail).toHaveBeenCalled()
     expect(updateProfileSpy).toHaveBeenCalledWith({
       isFirstConnection: false,
       onboarding: {
diff --git a/src/migrations/migration.service.spec.ts b/src/migrations/migration.service.spec.ts
index af4ee1112100df5ab2d99daa6c575bb5b735cf74..c865c5d7adff26fcd6ee1131e4f6f751a3ac0a6c 100644
--- a/src/migrations/migration.service.spec.ts
+++ b/src/migrations/migration.service.spec.ts
@@ -4,6 +4,7 @@ import { Profile } from 'models'
 import { Notes } from 'models/releaseNotes.model'
 import { Schema } from 'models/schema.models'
 import mockClient from 'tests/__mocks__/client.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 import * as Migrate from './migration'
 import { MIGRATION_RESULT_FAILED } from './migration.data'
 import { MigrationService } from './migration.service'
@@ -47,7 +48,7 @@ describe('Migration service', () => {
     ]
     mockClient.query.mockResolvedValue(mockQueryResult)
     await ms.runMigrations(migrations)
-    expect(migrateSpy).toBeCalledTimes(1)
+    expect(migrateSpy).toHaveBeenCalledTimes(1)
   })
 
   it('should run migrations with one fail', async () => {
@@ -79,7 +80,7 @@ describe('Migration service', () => {
     mockClient.query.mockResolvedValue(mockQueryResult)
 
     await ms.runMigrations(migrations)
-    expect(migrateSpyOneFail).toBeCalledTimes(2)
+    expect(migrateSpyOneFail).toHaveBeenCalledTimes(2)
   })
 
   it('should not run migrations with two fail', async () => {
@@ -112,13 +113,10 @@ describe('Migration service', () => {
       .spyOn(Migrate, 'migrate')
       .mockResolvedValueOnce(result)
       .mockResolvedValueOnce(result)
-    try {
-      await ms.runMigrations(migrations)
-      expect(migrateSpyTwoFailsKo).toBeCalledTimes(1)
-      expect(migrateSpy).toBeCalledTimes(1)
-    } catch (error) {
-      expect(error).toEqual(new Error())
-    }
+    const error = await getError(async () => ms.runMigrations(migrations))
+    expect(migrateSpyTwoFailsKo).toHaveBeenCalledTimes(2)
+    expect(migrateSpy).toHaveBeenCalledTimes(2)
+    expect(error).toEqual(new Error())
   })
 
   it('should skip migrations if schema number is up to date', async () => {
@@ -145,7 +143,7 @@ describe('Migration service', () => {
     mockClient.query.mockResolvedValue(mockQueryResult)
 
     await ms.runMigrations(migrations)
-    expect(migrateSpy).toBeCalledTimes(0)
+    expect(migrateSpy).toHaveBeenCalledTimes(0)
   })
   it('should run 2 migrations properly from a fresh instance and dont show releasenotes', async () => {
     const schema: Schema = { _id: '1', version: 0 }
@@ -182,7 +180,7 @@ describe('Migration service', () => {
     mockClient.query.mockResolvedValue(mockQueryResult)
 
     const res = await ms.runMigrations(migrations)
-    expect(migrateSpy).toBeCalledTimes(2)
+    expect(migrateSpy).toHaveBeenCalledTimes(2)
     expect(res.show).toBeFalsy()
   })
 })
diff --git a/src/migrations/migration.spec.ts b/src/migrations/migration.spec.ts
index f316279e7a84243e810a6172b9ab895b41b607ae..03ae98d6611370f73800a205c7c26fea9b5aae44 100644
--- a/src/migrations/migration.spec.ts
+++ b/src/migrations/migration.spec.ts
@@ -30,13 +30,13 @@ describe('migration logger', () => {
     },
   }
 
-  it('it should return noop', () => {
+  it('should return noop', () => {
     const result: MigrationResult = { type: MIGRATION_RESULT_NOOP, errors: [] }
     const reply = migrationLog(migration, result)
     expect(reply).toEqual('--- Removing mailToken from profil => NOOP')
   })
 
-  it('it should return noop', () => {
+  it('should return Complete', () => {
     const result: MigrationResult = {
       type: MIGRATION_RESULT_COMPLETE,
       errors: [],
@@ -45,7 +45,7 @@ describe('migration logger', () => {
     expect(reply).toEqual('--- Removing mailToken from profil => Complete')
   })
 
-  it('it should return noop', () => {
+  it('should return Failed', () => {
     const result: MigrationResult = {
       type: MIGRATION_RESULT_FAILED,
       errors: [],
@@ -73,7 +73,7 @@ describe('migration', () => {
     },
   }
 
-  it('it should return schema does not exist', async () => {
+  it('should return schema does not exist', async () => {
     const mockQueryResult: QueryResult<Schema[]> = {
       data: [],
       bookmark: '',
@@ -94,7 +94,7 @@ describe('migration', () => {
     expect(result).toEqual({ type: MIGRATION_RESULT_NOOP, errors: [] })
   })
 
-  it('it should return migration failed', async () => {
+  it('should return migration failed', async () => {
     const mockQueryResult: QueryResult<Schema[]> = {
       data: [],
       bookmark: '',
@@ -120,7 +120,7 @@ describe('migration', () => {
     })
   })
 
-  it('it should return migration complete', async () => {
+  it('should return migration complete', async () => {
     const mockQueryResultWithoutAnySchema: QueryResult<Schema[]> = {
       data: [],
       bookmark: '',
@@ -152,7 +152,7 @@ describe('migration', () => {
     })
   })
 
-  it('it should return migration noop', async () => {
+  it('should return migration noop', async () => {
     const migrationTest: Migration = {
       baseSchemaVersion: 0,
       targetSchemaVersion: 1,
@@ -197,7 +197,7 @@ describe('migration', () => {
 })
 
 describe('migration create', () => {
-  it('it should return migration complete for creation', async () => {
+  it('should return migration complete for creation', async () => {
     const migrationTestCreate: Migration = {
       baseSchemaVersion: 0,
       targetSchemaVersion: 1,
diff --git a/src/services/account.service.spec.ts b/src/services/account.service.spec.ts
index e43bb207ecead2a8e3b815d1961296c08897a983..cb6e07b6b3524bd75fef20a8fccec046a716de1f 100644
--- a/src/services/account.service.spec.ts
+++ b/src/services/account.service.spec.ts
@@ -5,6 +5,7 @@ import { Account, AccountAuthData } from 'models'
 import { accountsData } from 'tests/__mocks__/accountsData.mock'
 import mockClient from 'tests/__mocks__/client.mock'
 import { konnectorsData } from 'tests/__mocks__/konnectorsData.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 import { triggersEnedisData } from 'tests/__mocks__/triggersData.mock'
 import AccountService from './account.service'
 
@@ -49,11 +50,10 @@ describe('Account service', () => {
     it('should throw error when fetchAccount unsuccessfully', async () => {
       mockHavestLibAccounts.fetchAccount.mockRejectedValueOnce(new Error())
       const mockId = 'io.cozy.konnectors/eglgrandlyon'
-      try {
-        await accountService.getAccount(mockId)
-      } catch (error) {
-        expect(error).toEqual(new Error('Get account failed'))
-      }
+      const error = await getError(async () =>
+        accountService.getAccount(mockId)
+      )
+      expect(error).toEqual(new Error('Get account failed'))
     })
   })
 
@@ -130,11 +130,10 @@ describe('Account service', () => {
 
     it('should throw error when updateAccount unsuccessfully', async () => {
       mockHavestLibAccounts.updateAccount.mockRejectedValueOnce(new Error())
-      try {
-        await accountService.updateAccount(accountsData[2])
-      } catch (error) {
-        expect(error).toEqual(new Error('Update account failed'))
-      }
+      const error = await getError(async () =>
+        accountService.updateAccount(accountsData[2])
+      )
+      expect(error).toEqual(new Error('Update account failed'))
     })
   })
 
@@ -147,11 +146,10 @@ describe('Account service', () => {
 
     it('should throw error when destroy unsuccessfully', async () => {
       mockHavestLibAccounts.deleteAccount.mockRejectedValueOnce(new Error())
-      try {
-        await accountService.deleteAccount(accountsData[2])
-      } catch (error) {
-        expect(error).toEqual(new Error('Delete account failed'))
-      }
+      const error = await getError(async () =>
+        accountService.deleteAccount(accountsData[2])
+      )
+      expect(error).toEqual(new Error('Delete account failed'))
     })
   })
 
diff --git a/src/services/challenge.service.spec.ts b/src/services/challenge.service.spec.ts
index a683a391bc374a7d06d970be2ffd5624617ed275..2f0c2bb070680dba3d22da91e25c02480094f487 100644
--- a/src/services/challenge.service.spec.ts
+++ b/src/services/challenge.service.spec.ts
@@ -42,6 +42,7 @@ import {
 } from 'tests/__mocks__/explorationData.mock'
 import { fluidStatusData } from 'tests/__mocks__/fluidStatusData.mock'
 import { quizEntity, userQuiz } from 'tests/__mocks__/quizData.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 import {
   userChallengeData,
   userChallengeDefault,
@@ -255,11 +256,10 @@ describe('Challenge service', () => {
       }
       mockClient.query.mockResolvedValueOnce(mockQueryResult)
       mockClient.destroy.mockRejectedValue(new Error())
-      try {
-        await challengeService.deleteAllChallengeEntities()
-      } catch (error) {
-        expect(error).toEqual(new Error())
-      }
+      const error = await getError(async () =>
+        challengeService.deleteAllChallengeEntities()
+      )
+      expect(error).toEqual(new Error())
     })
   })
 
@@ -307,12 +307,11 @@ describe('Challenge service', () => {
       expect(result).toEqual(expectedResult)
     })
     it('should throw an error because create failed', async () => {
-      mockClient.create.mockRejectedValue(new Error())
-      try {
-        await challengeService.initChallengeDuelProgress(userChallengeData[0])
-      } catch (error) {
-        expect(error).toEqual(new Error())
-      }
+      mockClient.save.mockRejectedValue(new Error())
+      const error = await getError(async () =>
+        challengeService.initChallengeDuelProgress(userChallengeData[0])
+      )
+      expect(error).toEqual(new Error())
     })
   })
 
@@ -332,11 +331,10 @@ describe('Challenge service', () => {
     })
     it('should throw an error because create failed', async () => {
       mockClient.create.mockRejectedValue(new Error())
-      try {
-        await challengeService.startUserChallenge(userChallengeData[0])
-      } catch (error) {
-        expect(error).toEqual(new Error())
-      }
+      const error = await getError(async () =>
+        challengeService.startUserChallenge(userChallengeData[0])
+      )
+      expect(error).toEqual(new Error())
     })
   })
 
@@ -374,14 +372,15 @@ describe('Challenge service', () => {
       )
       expect(result).toEqual(userChallengeData[0])
     })
-    it('should throw error when failed to save the updateUserChallenge', () => {
+    it('should throw error when failed to save the updateUserChallenge', async () => {
       mockClient.save.mockRejectedValueOnce(new Error())
-      expect(
+      const error = await getError(async () =>
         challengeService.updateUserChallenge(
           userChallengeData[0],
           UserChallengeUpdateFlag.DUEL_START
         )
-      ).rejects.toEqual(new Error())
+      )
+      expect(error).toEqual(new Error())
     })
   })
 
@@ -486,7 +485,7 @@ describe('Challenge service', () => {
         )
         expect(result).toEqual({ isDone: true, isWin: true })
       })
-      it('should return isDone = true, isWin = false when userConsumption >= threshold ', async () => {
+      it('should return isDone = true, isWin = false when userConsumption >= threshold', async () => {
         const updatedUserChallenge = {
           ...userChallenge,
           duel: {
@@ -572,7 +571,7 @@ describe('Challenge service', () => {
         expect(result).toEqual({ isDone: true, isWin: true })
       })
 
-      it('should return isDone = true and isWin = false when all data are available and userConsumption >= threshold ', async () => {
+      it('should return isDone = true and isWin = false when all data are available and userConsumption >= threshold', async () => {
         const updatedUserChallenge = {
           ...userChallenge,
           duel: {
diff --git a/src/services/challenge.service.ts b/src/services/challenge.service.ts
index e625f41799d07da72ae12f92447607ad399bdaa9..ff4623e38efa7339c588266be05e4d7d186bc019 100644
--- a/src/services/challenge.service.ts
+++ b/src/services/challenge.service.ts
@@ -518,10 +518,8 @@ export default class ChallengeService {
   }> {
     const consumptionService = new ConsumptionDataManager(this._client)
     try {
-      const dataloads: Dataload[] = await this.getUserChallengeDataload(
-        userChallenge
-      )
-      const userConsumption: number = getRoundFloat(
+      const dataloads = await this.getUserChallengeDataload(userChallenge)
+      const userConsumption = getRoundFloat(
         consumptionService.calculatePerformanceIndicatorValue(dataloads)
       )
       const _userChallenge: UserChallenge = {
@@ -531,11 +529,10 @@ export default class ChallengeService {
           userConsumption: userConsumption,
         },
       }
-      const updatedUserChallenge: UserChallenge =
-        await this.updateUserChallenge(
-          _userChallenge,
-          UserChallengeUpdateFlag.DUEL_CONSUMPTION
-        )
+      const updatedUserChallenge = await this.updateUserChallenge(
+        _userChallenge,
+        UserChallengeUpdateFlag.DUEL_CONSUMPTION
+      )
       return { updatedUserChallenge, dataloads }
     } catch (error) {
       const errorMessage = `Challenge service error on initChallengeDuelProgress: ${JSON.stringify(
diff --git a/src/services/consumptionFormatter.service.spec.ts b/src/services/consumptionFormatter.service.spec.ts
index bfcb9f2cbe4a65aa28eb9d109c6d24ff20c2d43b..2c07788f299d6ea224d3b7d0bb93a5f43c52a2c5 100644
--- a/src/services/consumptionFormatter.service.spec.ts
+++ b/src/services/consumptionFormatter.service.spec.ts
@@ -2,6 +2,7 @@ import { DataloadState, FluidType, TimeStep } from 'enums'
 import { DateTime } from 'luxon'
 import { Dataload, FluidStatus, TimePeriod } from 'models'
 import { fluidStatusConnectedData } from 'tests/__mocks__/fluidStatusData.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 import ConsumptionFormatterService from './consumptionFormatter.service'
 
 const localSpy = jest.spyOn(DateTime, 'local')
@@ -249,8 +250,8 @@ describe('ConsumptionFormatter service', () => {
       )
       expect(result).toEqual(mockResult)
     })
-    it('should return an error because of unknown TimeStep', () => {
-      try {
+    it('should return an error because of unknown TimeStep', async () => {
+      const error = await getError(async () =>
         consumptionFormatterService.formatGraphData(
           mockDataLoad,
           mockTimePeriod,
@@ -258,9 +259,8 @@ describe('ConsumptionFormatter service', () => {
           FluidType.ELECTRICITY,
           fluidStatus[FluidType.ELECTRICITY]
         )
-      } catch (error) {
-        expect(error).toEqual(new Error('TimeStep unknown'))
-      }
+      )
+      expect(error).toEqual(new Error('TimeStep unknown'))
     })
   })
 
diff --git a/src/services/consumptionValidator.service.spec.ts b/src/services/consumptionValidator.service.spec.ts
index e18a4f5b4b38e751b8da707db9ee4fd66050aff2..819a9724a39ae7e4890842d11e10a988f28eb9c0 100644
--- a/src/services/consumptionValidator.service.spec.ts
+++ b/src/services/consumptionValidator.service.spec.ts
@@ -11,15 +11,15 @@ const mockTimePeriodComparison: TimePeriod = {
   startDate: DateTime.fromISO('2020-09-01T00:00:00.000Z', { zone: 'utc' }),
   endDate: DateTime.fromISO('2020-09-03T23:59:59.999Z', { zone: 'utc' }),
 }
-let fluidTypes: FluidType[] = [0, 1, 2]
+let allFluids: FluidType[] = [0, 1, 2]
 describe('ConsumptionFormatter service', () => {
   const consumptionValidatorService = new ConsumptionValidatorService()
-  describe('formatGraphData method', () => {
+  describe('ValidateGetGraphData method', () => {
     it('should return true for DAY', () => {
       const result = consumptionValidatorService.ValidateGetGraphData(
         mockTimePeriod,
         TimeStep.DAY,
-        fluidTypes
+        allFluids
       )
       expect(result).toBeTruthy()
     })
@@ -27,7 +27,7 @@ describe('ConsumptionFormatter service', () => {
       const result = consumptionValidatorService.ValidateGetGraphData(
         mockTimePeriod,
         TimeStep.DAY,
-        fluidTypes,
+        allFluids,
         mockTimePeriodComparison
       )
       expect(result).toBeTruthy()
@@ -42,12 +42,12 @@ describe('ConsumptionFormatter service', () => {
       const result = consumptionValidatorService.ValidateGetGraphData(
         mockTimePeriod,
         TimeStep.DAY,
-        fluidTypes,
+        allFluids,
         wrongTimePeriodComparison
       )
       expect(result).toBeFalsy()
     })
-    it('should return false with comparison Date', () => {
+    it('should return false with comparison Date for elec', () => {
       const wrongTimePeriodComparison: TimePeriod = {
         startDate: DateTime.fromISO('2020-09-05T00:00:00.000Z', {
           zone: 'utc',
@@ -81,7 +81,7 @@ describe('ConsumptionFormatter service', () => {
       const result = consumptionValidatorService.ValidateGetGraphData(
         wrongTimePeriod,
         TimeStep.DAY,
-        fluidTypes
+        allFluids
       )
       expect(result).toBeFalsy()
     })
@@ -89,12 +89,12 @@ describe('ConsumptionFormatter service', () => {
       const result = consumptionValidatorService.ValidateGetGraphData(
         mockTimePeriod,
         TimeStep.HALF_AN_HOUR,
-        fluidTypes
+        allFluids
       )
       expect(result).toBeFalsy()
     })
     it('should return false because of HALF_AN_HOUR and ValidateTimePeriodLength', () => {
-      fluidTypes = [0] // Only fluid without TimeStep incompatibilty
+      allFluids = [0] // Only fluid without TimeStep incompatibilty
       const mockTimePeriodTooLong: TimePeriod = {
         startDate: DateTime.fromISO('2020-10-01T00:00:00.000Z', {
           zone: 'utc',
@@ -104,7 +104,7 @@ describe('ConsumptionFormatter service', () => {
       const result = consumptionValidatorService.ValidateGetGraphData(
         mockTimePeriodTooLong,
         TimeStep.HALF_AN_HOUR,
-        fluidTypes
+        allFluids
       )
       expect(result).toBeFalsy()
     })
@@ -118,7 +118,7 @@ describe('ConsumptionFormatter service', () => {
       const result = consumptionValidatorService.ValidateGetGraphData(
         mockTimePeriodTooLong,
         TimeStep.WEEK,
-        fluidTypes
+        allFluids
       )
       expect(result).toBeFalsy()
     })
@@ -132,7 +132,7 @@ describe('ConsumptionFormatter service', () => {
       const result = consumptionValidatorService.ValidateGetGraphData(
         mockTimePeriodTooLong,
         TimeStep.DAY,
-        fluidTypes
+        allFluids
       )
       expect(result).toBeFalsy()
     })
@@ -146,7 +146,7 @@ describe('ConsumptionFormatter service', () => {
       const result = consumptionValidatorService.ValidateGetGraphData(
         mockTimePeriodTooLong,
         TimeStep.MONTH,
-        fluidTypes
+        allFluids
       )
       expect(result).toBeFalsy()
     })
@@ -160,7 +160,7 @@ describe('ConsumptionFormatter service', () => {
       const result = consumptionValidatorService.ValidateGetGraphData(
         mockTimePeriodTooLong,
         TimeStep.YEAR,
-        fluidTypes
+        allFluids
       )
       expect(result).toBeFalsy()
     })
diff --git a/src/services/customPopup.service.test.ts b/src/services/customPopup.service.spec.ts
similarity index 95%
rename from src/services/customPopup.service.test.ts
rename to src/services/customPopup.service.spec.ts
index 6808d6cef52b8beae50f4e74fb8a7a9db869084f..11d1d9cc798e0e93b399a36b6a5e7d5a811d7a80 100644
--- a/src/services/customPopup.service.test.ts
+++ b/src/services/customPopup.service.spec.ts
@@ -24,7 +24,8 @@ describe('PartnersInfo service', () => {
       res = await customPopupService.getCustomPopup()
       expect(true).toBe(false)
     } catch (error) {
-      expect(res).toBe(undefined)
+      //
     }
+    expect(res).toBe(undefined)
   })
 })
diff --git a/src/services/customPopup.service.ts b/src/services/customPopup.service.ts
index 0237970e67b10a791d845b6f135b53c87ee7f34c..71c308900c26cb4fdb158f2e3f0a3cea07e2d3bc 100644
--- a/src/services/customPopup.service.ts
+++ b/src/services/customPopup.service.ts
@@ -20,7 +20,7 @@ export default class CustomPopupService {
   /**
    * Get information from backoffice about the status of custom popup
    * On success, respond the customPopup
-   * Else, throw an error
+   * Else, return undefined
    */
   public async getCustomPopup(): Promise<CustomPopup | undefined> {
     const env = new EnvironmentService()
diff --git a/src/services/dateChart.service.spec.ts b/src/services/dateChart.service.spec.ts
index f7bfff65968b2821202d48daa2781a61f4d67a8e..59c9d2d5b8cad3a3e4f8b7e347809c057cc24a2c 100644
--- a/src/services/dateChart.service.spec.ts
+++ b/src/services/dateChart.service.spec.ts
@@ -1,6 +1,7 @@
 import { TimeStep } from 'enums'
 import { DateTime } from 'luxon'
 import { TimePeriod } from 'models'
+import { getError } from 'tests/__mocks__/testUtils'
 import DateChartService from './dateChart.service'
 
 const localSpy = jest.spyOn(DateTime, 'local')
@@ -294,12 +295,11 @@ describe('dateChart service', () => {
       expect(result).toEqual(expectedTimePeriod)
     })
 
-    it('should throw error for unknown TimeStep', () => {
-      try {
+    it('should throw error for unknown TimeStep', async () => {
+      const error = await getError(async () =>
         dateChartService.defineTimePeriod(refDate, unknownTimeStep, -1)
-      } catch (error) {
-        expect(error).toEqual(new Error('TimeStep unknown'))
-      }
+      )
+      expect(error).toEqual(new Error('TimeStep unknown'))
     })
   })
 
@@ -686,18 +686,17 @@ describe('dateChart service', () => {
       expect(result).toBe(false)
     })
 
-    it('should throw error for unknown TimeStep', () => {
+    it('should throw error for unknown TimeStep', async () => {
       const firstDate = DateTime.fromISO('2020-10-31T00:00:00.000Z', {
         zone: 'utc',
       })
       const secondDate = DateTime.fromISO('2020-10-31T00:30:00.000Z', {
         zone: 'utc',
       })
-      try {
+      const error = await getError(async () =>
         dateChartService.compareStepDate(unknownTimeStep, firstDate, secondDate)
-      } catch (error) {
-        expect(error).toEqual(new Error('TimeStep unknown'))
-      }
+      )
+      expect(error).toEqual(new Error('TimeStep unknown'))
     })
   })
 
diff --git a/src/services/duel.service.spec.ts b/src/services/duel.service.spec.ts
index f50bf5e4a55f1cccae447c3bc05c7289a896200b..93cd9552abc03d91449dc2814d1bbb00aade13ac 100644
--- a/src/services/duel.service.spec.ts
+++ b/src/services/duel.service.spec.ts
@@ -14,6 +14,7 @@ import {
   fluidStatusConnectedData,
   fluidStatusData,
 } from 'tests/__mocks__/fluidStatusData.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 
 const mockGetPerformanceIndicators = jest.fn()
 const mockGetGraphData = jest.fn()
@@ -87,11 +88,10 @@ describe('Duel service', () => {
       }
       mockClient.query.mockResolvedValueOnce(mockQueryResult)
       mockClient.destroy.mockRejectedValue(new Error())
-      try {
-        await duelService.deleteAllDuelEntities()
-      } catch (error) {
-        expect(error).toEqual(new Error())
-      }
+      const error = await getError(async () =>
+        duelService.deleteAllDuelEntities()
+      )
+      expect(error).toEqual(new Error())
     })
   })
 
diff --git a/src/services/ecogesture.service.spec.ts b/src/services/ecogesture.service.spec.ts
index df4796ddcc9a10110950de45d65b03e62d72ca36..a249083d9be48b35dcfc48ea6bae4b039a80249a 100644
--- a/src/services/ecogesture.service.spec.ts
+++ b/src/services/ecogesture.service.spec.ts
@@ -12,6 +12,7 @@ import {
   mockedEcogesturesData,
 } from 'tests/__mocks__/ecogesturesData.mock'
 import { mockProfileEcogesture } from 'tests/__mocks__/profileEcogesture.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 import { hashFile } from 'utils/hash'
 import EcogestureService from './ecogesture.service'
 
@@ -58,7 +59,7 @@ describe('Ecogesture service', () => {
     it('should return true when 3 ecogestures stored', async () => {
       mockClient.query.mockResolvedValueOnce(mockQueryResultMockedEcogestures)
       const result = await ecogestureService.deleteAllEcogestures()
-      expect(mockClient.destroy).toBeCalledTimes(3)
+      expect(mockClient.destroy).toHaveBeenCalledTimes(3)
       expect(result).toBe(true)
     })
     it('should return true when no ecogestures stored', async () => {
@@ -78,7 +79,7 @@ describe('Ecogesture service', () => {
     it('should return true when 3 ecogestures stored', async () => {
       mockClient.query.mockResolvedValueOnce(mockQueryResultMockedEcogestures)
       const result = await ecogestureService.reinitAllEcogestures()
-      expect(mockClient.save).toBeCalledTimes(3)
+      expect(mockClient.save).toHaveBeenCalledTimes(3)
       expect(result).toBe(true)
     })
     it('should return true when no ecogestures stored', async () => {
@@ -303,7 +304,10 @@ describe('Ecogesture service', () => {
         .spyOn(ecogestureService, 'deleteAllEcogestures')
         .mockResolvedValue(true)
       mockClient.create.mockRejectedValueOnce(new Error())
-      expect(ecogestureService.initEcogesture('')).rejects.toThrow(new Error())
+      const error = await getError(async () =>
+        ecogestureService.initEcogesture('')
+      )
+      expect(error).toEqual(new Error())
     })
   })
 })
diff --git a/src/services/exploration.service.spec.ts b/src/services/exploration.service.spec.ts
index 9745d5f306389ac3c1f338ec4c2a606217698638..ebd9e8870624f574f962052d5f04bc10eda6aeea 100644
--- a/src/services/exploration.service.spec.ts
+++ b/src/services/exploration.service.spec.ts
@@ -9,6 +9,7 @@ import {
   userExplorationStarted,
   userExplorationUnlocked,
 } from 'tests/__mocks__/explorationData.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 import {
   userChallengeExplo1OnGoing,
   userChallengeExplo2OnGoing,
@@ -72,11 +73,10 @@ describe('Exploration service', () => {
       }
       mockClient.query.mockResolvedValueOnce(mockQueryResult)
       mockClient.destroy.mockRejectedValue(new Error())
-      try {
-        await explorationService.deleteAllExplorationEntities()
-      } catch (error) {
-        expect(error).toEqual(new Error())
-      }
+      const error = await getError(async () =>
+        explorationService.deleteAllExplorationEntities()
+      )
+      expect(error).toEqual(new Error())
     })
   })
 
diff --git a/src/services/fluidsPrices.service.spec.ts b/src/services/fluidsPrices.service.spec.ts
index c1620f889e8317e7417de95806a0cdf6060da188..a25157e4ca9c2d55fa9a3eefc442c15418e9dc30 100644
--- a/src/services/fluidsPrices.service.spec.ts
+++ b/src/services/fluidsPrices.service.spec.ts
@@ -7,6 +7,7 @@ import {
   allLastFluidPrices,
   fluidPrices,
 } from 'tests/__mocks__/fluidPrice.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 import FluidPricesService from './fluidsPrices.service'
 
 describe('FluidPrices service', () => {
@@ -23,7 +24,7 @@ describe('FluidPrices service', () => {
       mockClient.query.mockResolvedValueOnce(mockQueryResult)
       const prices = await fluidPricesService.getAllPrices()
       expect(prices).toBe(fluidPrices)
-      expect(mockClient.query).toBeCalled()
+      expect(mockClient.query).toHaveBeenCalled()
     })
   })
 
@@ -43,7 +44,7 @@ describe('FluidPrices service', () => {
         })
       )
       expect(prices).toBe(fluidPrices[0])
-      expect(mockClient.query).toBeCalled()
+      expect(mockClient.query).toHaveBeenCalled()
     })
     it('should getPrices for gas', async () => {
       const mockQueryResult: QueryResult<FluidPrice[]> = {
@@ -60,7 +61,7 @@ describe('FluidPrices service', () => {
         })
       )
       expect(prices).toBe(fluidPrices[3])
-      expect(mockClient.query).toBeCalled()
+      expect(mockClient.query).toHaveBeenCalled()
     })
   })
 
@@ -77,7 +78,7 @@ describe('FluidPrices service', () => {
       console.log('Prix reçus :', prices)
       console.log('Prix attendus :', allLastFluidPrices)
       expect(prices).toStrictEqual(allLastFluidPrices)
-      expect(mockClient.query).toBeCalled()
+      expect(mockClient.query).toHaveBeenCalled()
     })
   })
 
@@ -91,7 +92,7 @@ describe('FluidPrices service', () => {
       }
       mockClient.query.mockResolvedValueOnce(mockQueryResult)
       const result = await fluidPricesService.deleteAllFluidsPrices()
-      expect(mockClient.destroy).toBeCalledTimes(6)
+      expect(mockClient.destroy).toHaveBeenCalledTimes(6)
       expect(result).toBe(true)
     })
     it('should return true when no fluidsPrices stored', async () => {
@@ -128,7 +129,7 @@ describe('FluidPrices service', () => {
     mockClient.query.mockResolvedValueOnce(mockQueryResult)
     const price = await fluidPricesService.checkIfPriceExists(fluidPrices[0])
     expect(price).toStrictEqual(fluidPrices[0])
-    expect(mockClient.query).toBeCalled()
+    expect(mockClient.query).toHaveBeenCalled()
   })
   it('should create a price and return it', async () => {
     const mockQueryResult: QueryResult<FluidPrice> = {
@@ -143,11 +144,10 @@ describe('FluidPrices service', () => {
   })
   it('should fail to create a price', async () => {
     mockClient.create.mockRejectedValue(new Error())
-    try {
-      await fluidPricesService.createPrice(fluidPrices[0])
-    } catch (error) {
-      expect(error).toEqual(new Error())
-    }
+    const error = await getError(
+      async () => await fluidPricesService.createPrice(fluidPrices[0])
+    )
+    expect(error).toEqual(new Error())
   })
   it('should update a price', async () => {
     const updatedPrice = { ...fluidPrices[0], price: 0.1 }
@@ -162,16 +162,15 @@ describe('FluidPrices service', () => {
       price: 0.1,
     })
     expect(price).toStrictEqual(updatedPrice)
-    expect(mockClient.query).toBeCalled()
+    expect(mockClient.query).toHaveBeenCalled()
   })
   it('should fail to update a price', async () => {
     mockClient.save.mockRejectedValue(new Error())
-    try {
-      await fluidPricesService.updatePrice(fluidPrices[0], {
+    const error = await getError(async () =>
+      fluidPricesService.updatePrice(fluidPrices[0], {
         price: 0.1,
       })
-    } catch (error) {
-      expect(error).toEqual(new Error())
-    }
+    )
+    expect(error).toEqual(new Error())
   })
 })
diff --git a/src/services/initialization.service.spec.ts b/src/services/initialization.service.spec.ts
index 19669c17d3c20ec8062a6339cd114fddf7adf0bc..6b273c34f41bcb64a7a26f752d8d229bd8fc58eb 100644
--- a/src/services/initialization.service.spec.ts
+++ b/src/services/initialization.service.spec.ts
@@ -171,14 +171,18 @@ describe('Initialization service', () => {
         new Error('initProfile: Profile not created')
       )
     })
-    it('should throw error when the profile could not be fetched', () => {
+    it('should throw error when the profile could not be fetched', async () => {
       mockGetProfile.mockRejectedValueOnce(new Error())
-      expect(initializationService.initProfile()).rejects.toEqual(new Error())
+      await expect(initializationService.initProfile()).rejects.toEqual(
+        new Error()
+      )
     })
-    it('should throw error when the profile failed to be created', () => {
+    it('should throw error when the profile failed to be created', async () => {
       mockGetProfile.mockResolvedValueOnce(null)
       mockClient.create.mockRejectedValueOnce(new Error())
-      expect(initializationService.initProfile()).rejects.toEqual(new Error())
+      await expect(initializationService.initProfile()).rejects.toEqual(
+        new Error()
+      )
     })
   })
 
@@ -306,9 +310,9 @@ describe('Initialization service', () => {
         .mockResolvedValueOnce(challengeEntityData)
       mockDeleteAllChallengeEntities.mockResolvedValue(true)
       mockClient.create.mockRejectedValueOnce(new Error())
-      expect(initializationService.initChallengeEntity('')).rejects.toThrow(
-        new Error()
-      )
+      await expect(
+        initializationService.initChallengeEntity('')
+      ).rejects.toThrow(new Error())
     })
   })
 
@@ -398,7 +402,7 @@ describe('Initialization service', () => {
         .mockResolvedValueOnce(duelEntityData)
       mockDeleteAllDuelEntities.mockResolvedValue(true)
       mockClient.create.mockRejectedValueOnce(new Error())
-      expect(initializationService.initDuelEntity('')).rejects.toThrow(
+      await expect(initializationService.initDuelEntity('')).rejects.toThrow(
         new Error()
       )
     })
@@ -490,7 +494,7 @@ describe('Initialization service', () => {
         .mockResolvedValueOnce(quizEntityData)
       mockDeleteAllQuizEntities.mockResolvedValue(true)
       mockClient.create.mockRejectedValueOnce(new Error())
-      expect(initializationService.initQuizEntity('')).rejects.toThrow(
+      await expect(initializationService.initQuizEntity('')).rejects.toThrow(
         new Error()
       )
     })
@@ -592,9 +596,9 @@ describe('Initialization service', () => {
         .mockResolvedValueOnce(explorationEntityData)
       mockDeleteAllExplorationEntities.mockResolvedValue(true)
       mockClient.create.mockRejectedValueOnce(new Error())
-      expect(initializationService.initExplorationEntity('')).rejects.toThrow(
-        new Error()
-      )
+      await expect(
+        initializationService.initExplorationEntity('')
+      ).rejects.toThrow(new Error())
     })
   })
 
diff --git a/src/services/partnersInfo.service.spec.ts b/src/services/partnersInfo.service.spec.ts
index 652109c9ea3ffc5336c82241081da350a07eed3d..43e2240179a570722e85c8003edbb7ad2ecee090 100644
--- a/src/services/partnersInfo.service.spec.ts
+++ b/src/services/partnersInfo.service.spec.ts
@@ -28,14 +28,15 @@ describe('PartnersInfo service', () => {
     expect(result).toEqual(mockPartnersInfo)
   })
 
-  it('should return an error', async () => {
+  it('should return undefined', async () => {
     mockClient.getStackClient().fetchJSON.mockRejectedValue(new Error())
     let res
     try {
       res = await partnersInfoService.getPartnersInfo()
       expect(true).toBe(false)
-    } catch (error) {
-      expect(res).toBe(undefined)
+    } catch (e) {
+      //
     }
+    expect(res).toBe(undefined)
   })
 })
diff --git a/src/services/partnersInfo.service.ts b/src/services/partnersInfo.service.ts
index 6a39656d9bb695b99412cc69d1094b0901e364eb..18bf02ce54e5b946246f629c6a0ac746c7c9d458 100644
--- a/src/services/partnersInfo.service.ts
+++ b/src/services/partnersInfo.service.ts
@@ -20,7 +20,7 @@ export default class PartnersInfoService {
   /**
    * Get information from backoffice about the status of partners' service
    * On success, respond the partnersInfo
-   * Else, throw an error
+   * Else, return undefined
    */
   public async getPartnersInfo(): Promise<PartnersInfo | undefined> {
     const env = new EnvironmentService()
diff --git a/src/services/queryRunner.service.spec.ts b/src/services/queryRunner.service.spec.ts
index f273f8f47701ac839585b0914d45e5c835f0a88d..656180de012107559449b5f0b7a78ed61419aa5a 100644
--- a/src/services/queryRunner.service.spec.ts
+++ b/src/services/queryRunner.service.spec.ts
@@ -1367,7 +1367,7 @@ describe('queryRunner service', () => {
     })
   })
 
-  describe('fetchFluidData method', () => {
+  describe('fetchFluidRawDoctype method', () => {
     it('should return the data of the elec fluid and year time step', async () => {
       const mockTimePeriod = {
         startDate: DateTime.fromISO('2018-01-01T00:00:00.000Z', {
diff --git a/src/services/quiz.service.spec.ts b/src/services/quiz.service.spec.ts
index 6db5b0f9046c00307bed171c4200ff6a60e71239..7b891b8419ff4ca068327a52d776f8a3ed7000d0 100644
--- a/src/services/quiz.service.spec.ts
+++ b/src/services/quiz.service.spec.ts
@@ -31,6 +31,7 @@ import {
   quizEntity,
   userQuiz,
 } from 'tests/__mocks__/quizData.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 import QuizService from './quiz.service'
 
 const localSpy = jest.spyOn(DateTime, 'local')
@@ -101,11 +102,10 @@ describe('Quiz service', () => {
       }
       mockClient.query.mockResolvedValueOnce(mockQueryResult)
       mockClient.destroy.mockRejectedValue(new Error())
-      try {
-        await quizService.deleteAllQuizEntities()
-      } catch (error) {
-        expect(error).toEqual(new Error())
-      }
+      const error = await getError(async () =>
+        quizService.deleteAllQuizEntities()
+      )
+      expect(error).toEqual(new Error())
     })
   })
 
diff --git a/src/services/timePeriod.service.spec.ts b/src/services/timePeriod.service.spec.ts
index fe57abc9791ed4e47409b95a59247ffcdb0c43a4..abc6455fb1c27f99e61c5091ffd234a929f2193e 100644
--- a/src/services/timePeriod.service.spec.ts
+++ b/src/services/timePeriod.service.spec.ts
@@ -1,6 +1,7 @@
 import { FluidType, TimeStep } from 'enums'
 import { DateTime } from 'luxon'
 import { TimePeriod } from 'models'
+import { getError } from 'tests/__mocks__/testUtils'
 import TimePeriodService from './timePeriod.service'
 
 const randomDate = DateTime.fromISO('2020-10-10T08:00:00.000Z', {
@@ -253,7 +254,7 @@ describe('timePeriod service', () => {
       )
       expect(result).toEqual(expectedComparisonDateTime)
     })
-    it('should return an error because of unknown TimeStep', () => {
+    it('should return an error because of unknown TimeStep', async () => {
       const timePeriod: TimePeriod = {
         startDate: DateTime.fromISO('2020-10-07T08:00:00.000Z', {
           zone: 'utc',
@@ -262,11 +263,10 @@ describe('timePeriod service', () => {
           zone: 'utc',
         }),
       }
-      try {
+      const error = await getError(async () =>
         timePeriodService.getComparisonTimePeriod(timePeriod, unknownTimeStep)
-      } catch (error) {
-        expect(error).toEqual(new Error('TimeStep unknown'))
-      }
+      )
+      expect(error).toEqual(new Error('TimeStep unknown'))
     })
   })
 
@@ -321,15 +321,14 @@ describe('timePeriod service', () => {
       )
       expect(result).toEqual(expectedDate)
     })
-    it('should return an error because of unknown TimeStep', () => {
-      try {
+    it('should return an error because of unknown TimeStep', async () => {
+      const error = await getError(async () =>
         timePeriodService.getLastDayOfCompletePeriod(
           randomDate,
           unknownTimeStep
         )
-      } catch (error) {
-        expect(error).toEqual(new Error('TimeStep unknown'))
-      }
+      )
+      expect(error).toEqual(new Error('TimeStep unknown'))
     })
   })
 
@@ -374,7 +373,7 @@ describe('timePeriod service', () => {
       )
       expect(result).toEqual(expectedDate)
     })
-    it('should return the date of the last day of current period', () => {
+    it('should return the date of the last day of current period for year', () => {
       const expectedDate = DateTime.fromISO('2020-12-31T00:00:00.000Z', {
         zone: 'utc',
       })
@@ -384,12 +383,11 @@ describe('timePeriod service', () => {
       )
       expect(result).toEqual(expectedDate)
     })
-    it('should return the date of the last day of current period', () => {
-      try {
+    it('should return unknown timestep', async () => {
+      const error = await getError(async () =>
         timePeriodService.getLastDayOfTimePeriod(randomDate, unknownTimeStep)
-      } catch (error) {
-        expect(error).toEqual(new Error('TimeStep unknown'))
-      }
+      )
+      expect(error).toEqual(new Error('TimeStep unknown'))
     })
   })
 
@@ -444,15 +442,14 @@ describe('timePeriod service', () => {
       )
       expect(result).toEqual(expectedDate)
     })
-    it('should return the date of the last day of current period', () => {
-      try {
+    it('should return the date of the last day of current period', async () => {
+      const error = await getError(async () =>
         timePeriodService.getStartDateFromEndDateByTimeStep(
           randomDate,
           unknownTimeStep
         )
-      } catch (error) {
-        expect(error).toEqual(new Error('TimeStep unknown'))
-      }
+      )
+      expect(error).toEqual(new Error('TimeStep unknown'))
     })
   })
 })
diff --git a/src/services/triggers.service.spec.ts b/src/services/triggers.service.spec.ts
index 23aac8b3769adef41f454a05637b77322d1588c7..88691fb425594dd7be6c13074c98252cff2dacd3 100644
--- a/src/services/triggers.service.spec.ts
+++ b/src/services/triggers.service.spec.ts
@@ -3,6 +3,7 @@ import { Trigger, TriggerState } from 'models'
 import { accountsData } from 'tests/__mocks__/accountsData.mock'
 import mockClient from 'tests/__mocks__/client.mock'
 import { konnectorsData } from 'tests/__mocks__/konnectorsData.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 import { triggerStateData } from 'tests/__mocks__/triggerStateData.mock'
 import { triggersData } from 'tests/__mocks__/triggersData.mock'
 import TriggerService from './triggers.service'
@@ -119,34 +120,32 @@ describe('TriggerService service', () => {
 
     it('should throw an error', async () => {
       mockClient.getStackClient().fetchJSON.mockRejectedValueOnce(new Error())
-      try {
-        await triggerService.fetchTriggerState(triggersData[0])
-      } catch (error) {
-        expect(error).toEqual(new Error('Fetch trigger state failed'))
-      }
+      const error = await getError(async () =>
+        triggerService.fetchTriggerState(triggersData[0])
+      )
+      expect(error).toEqual(new Error('Fetch trigger state failed'))
     })
   })
 
   describe('deleteTrigger method', () => {
     it('should return true when destroy successfully', async () => {
-      const mockDetroyResult: QueryResult<Trigger[]> = {
+      const mockDestroyResult: QueryResult<Trigger[]> = {
         data: [],
         bookmark: '',
         next: false,
         skip: 0,
       }
-      mockClient.destroy.mockResolvedValueOnce(mockDetroyResult)
+      mockClient.destroy.mockResolvedValueOnce(mockDestroyResult)
       const result = await triggerService.deleteTrigger(triggersData[0])
       expect(result).toBe(true)
     })
 
     it('should throw error when destroy unsuccessfully', async () => {
       mockClient.destroy.mockRejectedValueOnce(new Error())
-      try {
-        await triggerService.deleteTrigger(triggersData[0])
-      } catch (error) {
-        expect(error).toEqual(new Error('Delete trigger failed'))
-      }
+      const error = await getError(async () =>
+        triggerService.deleteTrigger(triggersData[0])
+      )
+      expect(error).toEqual(new Error('Delete trigger failed'))
     })
   })
 })
diff --git a/src/services/usageEvent.service.spec.ts b/src/services/usageEvent.service.spec.ts
index eed34dce581ff7903a847774abf0fcd424d2cd71..237f7c74dff74ee0799075260c8df7008e61ee81 100644
--- a/src/services/usageEvent.service.spec.ts
+++ b/src/services/usageEvent.service.spec.ts
@@ -3,6 +3,7 @@ import { UsageEventType } from 'enums'
 import { DateTime } from 'luxon'
 import { AddEventParams, UsageEventEntity } from 'models'
 import mockClient from 'tests/__mocks__/client.mock'
+import { getError } from 'tests/__mocks__/testUtils'
 import {
   allUsageEventsData,
   connectionAttemptEGLError,
@@ -63,14 +64,13 @@ describe('UsageEvent service', () => {
     })
     it('should throw an error', async () => {
       mockClient.save.mockRejectedValue(new Error())
-      try {
-        await UsageEventService.updateUsageEventsAggregated(
+      const error = await getError(async () =>
+        UsageEventService.updateUsageEventsAggregated(
           mockClient,
           allUsageEventsData
         )
-      } catch (error) {
-        expect(error).toEqual(new Error())
-      }
+      )
+      expect(error).toEqual(new Error('Could not update all events'))
     })
   })
   describe('getEvents method', () => {
diff --git a/src/services/usageEvent.service.ts b/src/services/usageEvent.service.ts
index d974895456a14838be60268e59b425d8ac58aa5f..7b396168c1b864e783a9913997ebdd0f596a4ac4 100644
--- a/src/services/usageEvent.service.ts
+++ b/src/services/usageEvent.service.ts
@@ -120,22 +120,23 @@ export default class UsageEventService {
     client: Client,
     events: UsageEvent[]
   ): Promise<boolean> {
-    for (const event of events) {
-      try {
+    try {
+      for (const event of events) {
         await client.save({
           ...event,
           aggregated: true,
         })
-      } catch (error) {
-        const errorMessage = `UsageEvent service error on updateUsageEventsAggregated: ${JSON.stringify(
-          error
-        )}`
-        logStack('error', errorMessage)
-        logApp.error(errorMessage)
-        Sentry.captureException(errorMessage)
       }
+      return true
+    } catch (error) {
+      const errorMessage = `UsageEvent service error on updateUsageEventsAggregated: ${JSON.stringify(
+        error
+      )}`
+      logStack('error', errorMessage)
+      logApp.error(errorMessage)
+      Sentry.captureException(errorMessage)
+      throw new Error('Could not update all events')
     }
-    return true
   }
 
   /**
diff --git a/src/store/challenge/challenge.slice.spec.ts b/src/store/challenge/challenge.slice.spec.ts
index 759c4c86823be1a0873a149863cd5718506207a4..f4a265cdf615264845e93d98099247311b8e174f 100644
--- a/src/store/challenge/challenge.slice.spec.ts
+++ b/src/store/challenge/challenge.slice.spec.ts
@@ -33,7 +33,7 @@ describe('challenge reducer', () => {
     expect(state).toEqual(expectedResult)
   })
 
-  it('should handle updateUserChallengeList ', () => {
+  it('should handle updateUserChallengeList', () => {
     const updatedMockInitialChallengeState = {
       ...mockChallengeState,
       userChallengeList: userChallengeDefault,
@@ -57,7 +57,7 @@ describe('challenge reducer', () => {
     expect(state).toEqual(expectedResult)
   })
 
-  it('should handle unlockNextUserChallenge ', () => {
+  it('should handle unlockNextUserChallenge', () => {
     const updatedMockInitialChallengeState = {
       ...mockChallengeState,
       userChallengeList: userChallengeDefault,
@@ -87,7 +87,7 @@ describe('challenge reducer', () => {
     expect(state).toEqual(expectedResult)
   })
 
-  it('should handle SET_CHALLENGE_CONSUMPTION ', () => {
+  it('should handle SET_CHALLENGE_CONSUMPTION', () => {
     const updatedMockInitialChallengeState = {
       ...mockChallengeState,
       userChallengeList: userChallengeDefault,
diff --git a/src/store/chart/chart.slice.spec.ts b/src/store/chart/chart.slice.spec.ts
index e0d04f15c9bcbd3d39a7a2777ee51f9ced145d26..9015e59e329b09ed494600f00def39203bac9ad5 100644
--- a/src/store/chart/chart.slice.spec.ts
+++ b/src/store/chart/chart.slice.spec.ts
@@ -120,90 +120,3 @@ describe('chart reducer', () => {
     })
   })
 })
-
-describe('chart reducer', () => {
-  it('should return the initial state', () => {
-    const initialState = chartSlice.reducer(undefined, { type: undefined })
-    expect(initialState).toEqual(mockChartState)
-  })
-
-  it('should return same state if no action', () => {
-    const state = chartSlice.reducer(mockChartState, { type: undefined })
-    expect(state).toEqual(mockChartState)
-  })
-
-  describe('setSelectedDate', () => {
-    it('should handle SET_SELECTED_DATE with payload', () => {
-      const mockDate = DateTime.fromISO('2021-01-01T00:00:00.000Z', {
-        zone: 'utc',
-      })
-      const state = chartSlice.reducer(
-        mockChartState,
-        setSelectedDate(mockDate)
-      )
-      expect(state).toEqual({
-        ...mockChartState,
-        selectedDate: mockDate,
-      })
-    })
-  })
-
-  describe('setCurrentTimeStep', () => {
-    it('should handle SET_CURRENT_TIMESTEP with payload', () => {
-      const state = chartSlice.reducer(
-        mockChartState,
-        setCurrentTimeStep(TimeStep.MONTH)
-      )
-      expect(state).toEqual({
-        ...mockChartState,
-        currentTimeStep: TimeStep.MONTH,
-      })
-    })
-  })
-
-  describe('setCurrentIndex', () => {
-    it('should handle SET_CURRENT_INDEX with payload', () => {
-      const state = chartSlice.reducer(mockChartState, setCurrentIndex(1))
-      expect(state).toEqual({
-        ...mockChartState,
-        currentIndex: 1,
-      })
-    })
-  })
-
-  describe('setCurrentDataChart', () => {
-    it('should handle SET_CURRENT_DATACHART with payload', () => {
-      const state = chartSlice.reducer(
-        mockChartState,
-        setCurrentDataChart(graphData)
-      )
-      expect(state).toEqual({
-        ...mockChartState,
-        currentDatachart: graphData,
-      })
-    })
-  })
-
-  describe('setCurrentDataChartIndex', () => {
-    it('should handle SET_CURRENT_DATACHART_INDEX with payload', () => {
-      const state = chartSlice.reducer(
-        mockChartState,
-        setCurrentDataChartIndex(1)
-      )
-      expect(state).toEqual({
-        ...mockChartState,
-        currentDatachartIndex: 1,
-      })
-    })
-  })
-
-  describe('setLoading', () => {
-    it('should handle SET_LOADING with payload', () => {
-      const state = chartSlice.reducer(mockChartState, setLoading(false))
-      expect(state).toEqual({
-        ...mockChartState,
-        loading: false,
-      })
-    })
-  })
-})
diff --git a/src/utils/date.spec.ts b/src/utils/date.spec.ts
index 2e3d5ee8c3b814c17f041def6f0f6a6c2fc4a9e0..a1028add5844625ad644a9bd30cdacc365924758 100644
--- a/src/utils/date.spec.ts
+++ b/src/utils/date.spec.ts
@@ -346,7 +346,7 @@ describe('date utils', () => {
       expect(result).toBe(3)
     })
 
-    it('it should return 3 when there are many fluid type including WATER', () => {
+    it('should return 3 when there are many fluid type including WATER', () => {
       const result = getLagDays([FluidType.ELECTRICITY, FluidType.WATER])
       expect(result).toBe(3)
     })
@@ -356,12 +356,12 @@ describe('date utils', () => {
       expect(result).toBe(2)
     })
 
-    it('it should return 2 when there are many fluid type including GAS and excluding WATER', () => {
+    it('should return 2 when there are many fluid type including GAS and excluding WATER', () => {
       const result = getLagDays([FluidType.ELECTRICITY, FluidType.GAS])
       expect(result).toBe(2)
     })
 
-    it('it should return when there is only ELECTRICITY Fluid Type', () => {
+    it('should return when there is only ELECTRICITY Fluid Type', () => {
       const result = getLagDays([FluidType.ELECTRICITY])
       expect(result).toBe(1)
     })
diff --git a/src/utils/utils.spec.ts b/src/utils/utils.spec.ts
index db1e042d022b0931208d12cf19c20a6a4e307fe2..1fe7e5944fb3ec95055b854411e2044d96d97af3 100644
--- a/src/utils/utils.spec.ts
+++ b/src/utils/utils.spec.ts
@@ -197,18 +197,18 @@ describe('utils test', () => {
     })
   })
 
-  describe('getMonthFullName', () => {
+  describe('getMonthName', () => {
     it('should return the name of the month', () => {
       expect(getMonthName(DateTime.local(2023, 6, 1))).toBe('juin')
     })
   })
   describe('getMonthNameWithPrep', () => {
-    it('should return the name of the month with " de " ', () => {
+    it('should return the name of the month with " de "', () => {
       const date = DateTime.fromISO('2020-11-29T23:59:59.999Z')
       expect(getMonthNameWithPrep(date)).toBe('de novembre')
     })
 
-    it('should return the name of the month with " d\'" ', () => {
+    it('should return the name of the month with " d\'"', () => {
       const date = DateTime.fromISO('2020-10-29T23:59:59.999Z')
       expect(getMonthNameWithPrep(date)).toBe('d’octobre')
     })
diff --git a/tests/__mocks__/testUtils.ts b/tests/__mocks__/testUtils.ts
index 6b779ccf6faab7c684fa756df3415156264a349d..dd25be4229602ef6a971d988aa8940b1a561750e 100644
--- a/tests/__mocks__/testUtils.ts
+++ b/tests/__mocks__/testUtils.ts
@@ -9,3 +9,22 @@ export const waitForComponentToPaint = async <TP extends any = {}>(
     wrapper.update()
   })
 }
+
+class NoErrorThrownError extends Error {}
+
+/**
+ * @issue Jest only considers a test to have failed if it throws an error, meaning if calls to assertion functions like expect occur in conditional code such as a catch statement, tests can end up passing but not actually test anything.
+ * @solution A better way to handle this situation is to introduce a wrapper to handle the catching, and otherwise return a specific "no error thrown" error if nothing is thrown by the wrapped function
+ * @docs https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-conditional-expect.md#disallow-calling-expect-conditionally-no-conditional-expect
+ */
+export const getError = async <TError>(
+  call: () => unknown
+): Promise<TError> => {
+  try {
+    await call()
+
+    throw new NoErrorThrownError('No error thrown')
+  } catch (error: unknown) {
+    return error as TError
+  }
+}
diff --git a/yarn.lock b/yarn.lock
index 7bf41b3b3e8668c496c441abade5462171a6946b..fa4b819ca721cf26e2e22ef281ed6ae0fcca4d40 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,6 +2,11 @@
 # yarn lockfile v1
 
 
+"@aashutoshrathi/word-wrap@^1.2.3":
+  version "1.2.6"
+  resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf"
+  integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==
+
 "@alloc/types@^1.2.1":
   version "1.3.0"
   resolved "https://registry.yarnpkg.com/@alloc/types/-/types-1.3.0.tgz#904245b8d3260a4b7d8a801c12501968f64fac08"
@@ -1681,6 +1686,11 @@
   resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.4.0.tgz#3e61c564fcd6b921cb789838631c5ee44df09403"
   integrity sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==
 
+"@eslint-community/regexpp@^4.6.1":
+  version "4.8.0"
+  resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.0.tgz#11195513186f68d42fbf449f9a7136b2c0c92005"
+  integrity sha512-JylOEEzDiOryeUnFbQz+oViCXS0KsvR1mvHkoMiu5+UiBvy+RYX7tzlIIIEstF/gVa2tj9AQXk3dgnxv6KxhFg==
+
 "@eslint/eslintrc@^0.4.3":
   version "0.4.3"
   resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
@@ -1711,14 +1721,14 @@
     minimatch "^3.1.2"
     strip-json-comments "^3.1.1"
 
-"@eslint/eslintrc@^2.0.1":
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.1.tgz#7888fe7ec8f21bc26d646dbd2c11cd776e21192d"
-  integrity sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==
+"@eslint/eslintrc@^2.1.2":
+  version "2.1.2"
+  resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396"
+  integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==
   dependencies:
     ajv "^6.12.4"
     debug "^4.3.2"
-    espree "^9.5.0"
+    espree "^9.6.0"
     globals "^13.19.0"
     ignore "^5.2.0"
     import-fresh "^3.2.1"
@@ -1726,20 +1736,20 @@
     minimatch "^3.1.2"
     strip-json-comments "^3.1.1"
 
-"@eslint/js@8.36.0":
-  version "8.36.0"
-  resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.36.0.tgz#9837f768c03a1e4a30bd304a64fb8844f0e72efe"
-  integrity sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==
+"@eslint/js@8.49.0":
+  version "8.49.0"
+  resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.49.0.tgz#86f79756004a97fa4df866835093f1df3d03c333"
+  integrity sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==
 
 "@gar/promisify@^1.0.1":
   version "1.1.3"
   resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6"
   integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==
 
-"@humanwhocodes/config-array@^0.11.8":
-  version "0.11.8"
-  resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.8.tgz#03595ac2075a4dc0f191cc2131de14fbd7d410b9"
-  integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==
+"@humanwhocodes/config-array@^0.11.11":
+  version "0.11.11"
+  resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844"
+  integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==
   dependencies:
     "@humanwhocodes/object-schema" "^1.2.1"
     debug "^4.1.1"
@@ -3123,6 +3133,14 @@
     "@typescript-eslint/types" "5.56.0"
     "@typescript-eslint/visitor-keys" "5.56.0"
 
+"@typescript-eslint/scope-manager@5.62.0":
+  version "5.62.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c"
+  integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==
+  dependencies:
+    "@typescript-eslint/types" "5.62.0"
+    "@typescript-eslint/visitor-keys" "5.62.0"
+
 "@typescript-eslint/type-utils@5.56.0":
   version "5.56.0"
   resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.56.0.tgz#e6f004a072f09c42e263dc50e98c70b41a509685"
@@ -3143,6 +3161,11 @@
   resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.56.0.tgz#b03f0bfd6fa2afff4e67c5795930aff398cbd834"
   integrity sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w==
 
+"@typescript-eslint/types@5.62.0":
+  version "5.62.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f"
+  integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==
+
 "@typescript-eslint/typescript-estree@5.30.5":
   version "5.30.5"
   resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz#c520e4eba20551c4ec76af8d344a42eb6c9767bb"
@@ -3169,6 +3192,19 @@
     semver "^7.3.7"
     tsutils "^3.21.0"
 
+"@typescript-eslint/typescript-estree@5.62.0":
+  version "5.62.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b"
+  integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==
+  dependencies:
+    "@typescript-eslint/types" "5.62.0"
+    "@typescript-eslint/visitor-keys" "5.62.0"
+    debug "^4.3.4"
+    globby "^11.1.0"
+    is-glob "^4.0.3"
+    semver "^7.3.7"
+    tsutils "^3.21.0"
+
 "@typescript-eslint/utils@5.56.0":
   version "5.56.0"
   resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.56.0.tgz#db64705409b9a15546053fb4deb2888b37df1f41"
@@ -3183,6 +3219,20 @@
     eslint-scope "^5.1.1"
     semver "^7.3.7"
 
+"@typescript-eslint/utils@^5.10.0":
+  version "5.62.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86"
+  integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==
+  dependencies:
+    "@eslint-community/eslint-utils" "^4.2.0"
+    "@types/json-schema" "^7.0.9"
+    "@types/semver" "^7.3.12"
+    "@typescript-eslint/scope-manager" "5.62.0"
+    "@typescript-eslint/types" "5.62.0"
+    "@typescript-eslint/typescript-estree" "5.62.0"
+    eslint-scope "^5.1.1"
+    semver "^7.3.7"
+
 "@typescript-eslint/visitor-keys@5.30.5":
   version "5.30.5"
   resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz#d4bb969202019d5d5d849a0aaedc7370cc044b14"
@@ -3199,6 +3249,14 @@
     "@typescript-eslint/types" "5.56.0"
     eslint-visitor-keys "^3.3.0"
 
+"@typescript-eslint/visitor-keys@5.62.0":
+  version "5.62.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e"
+  integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==
+  dependencies:
+    "@typescript-eslint/types" "5.62.0"
+    eslint-visitor-keys "^3.3.0"
+
 "@webassemblyjs/ast@1.9.0":
   version "1.9.0"
   resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964"
@@ -3413,10 +3471,10 @@ acorn@^8.2.4, acorn@^8.7.1:
   resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30"
   integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==
 
-acorn@^8.8.0:
-  version "8.8.2"
-  resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a"
-  integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==
+acorn@^8.9.0:
+  version "8.10.0"
+  resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5"
+  integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==
 
 add-stream@^1.0.0:
   version "1.0.0"
@@ -4681,9 +4739,9 @@ camelcase@^6.0.0:
   integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
 
 caniuse-lite@^1.0.30001039, caniuse-lite@^1.0.30001359:
-  version "1.0.30001361"
-  resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001361.tgz#ba2adb2527566fb96f3ac7c67698ae7fc495a28d"
-  integrity sha512-ybhCrjNtkFji1/Wto6SSJKkWk6kZgVQsDq5QI83SafsF6FXv2JB4df9eEdH6g8sdGgqTXrFLjAxqBGgYoU3azQ==
+  version "1.0.30001538"
+  resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz"
+  integrity sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw==
 
 capture-exit@^2.0.0:
   version "2.0.0"
@@ -7493,6 +7551,13 @@ eslint-loader@^4.0.2:
     object-hash "^2.0.3"
     schema-utils "^2.6.5"
 
+eslint-plugin-jest@^27.2.3:
+  version "27.2.3"
+  resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.2.3.tgz#6f8a4bb2ca82c0c5d481d1b3be256ab001f5a3ec"
+  integrity sha512-sRLlSCpICzWuje66Gl9zvdF6mwD5X86I4u55hJyFBsxYOsBCmT5+kSUjf+fkFWVMMgpzNEupjW8WzUqi83hJAQ==
+  dependencies:
+    "@typescript-eslint/utils" "^5.10.0"
+
 eslint-plugin-prettier@3.1.2:
   version "3.1.2"
   resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz#432e5a667666ab84ce72f945c72f77d996a5c9ba"
@@ -7615,6 +7680,14 @@ eslint-scope@^7.0.0, eslint-scope@^7.1.1:
     esrecurse "^4.3.0"
     estraverse "^5.2.0"
 
+eslint-scope@^7.2.2:
+  version "7.2.2"
+  resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f"
+  integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==
+  dependencies:
+    esrecurse "^4.3.0"
+    estraverse "^5.2.0"
+
 eslint-utils@^1.3.1:
   version "1.4.3"
   resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
@@ -7651,6 +7724,11 @@ eslint-visitor-keys@^3.1.0, eslint-visitor-keys@^3.3.0:
   resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
   integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
 
+eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3:
+  version "3.4.3"
+  resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
+  integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
+
 eslint@5.16.0:
   version "5.16.0"
   resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea"
@@ -7739,27 +7817,27 @@ eslint@^7.32.0:
     text-table "^0.2.0"
     v8-compile-cache "^2.0.3"
 
-eslint@^8.36.0:
-  version "8.36.0"
-  resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.36.0.tgz#1bd72202200a5492f91803b113fb8a83b11285cf"
-  integrity sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==
+eslint@^8.49.0:
+  version "8.49.0"
+  resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.49.0.tgz#09d80a89bdb4edee2efcf6964623af1054bf6d42"
+  integrity sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==
   dependencies:
     "@eslint-community/eslint-utils" "^4.2.0"
-    "@eslint-community/regexpp" "^4.4.0"
-    "@eslint/eslintrc" "^2.0.1"
-    "@eslint/js" "8.36.0"
-    "@humanwhocodes/config-array" "^0.11.8"
+    "@eslint-community/regexpp" "^4.6.1"
+    "@eslint/eslintrc" "^2.1.2"
+    "@eslint/js" "8.49.0"
+    "@humanwhocodes/config-array" "^0.11.11"
     "@humanwhocodes/module-importer" "^1.0.1"
     "@nodelib/fs.walk" "^1.2.8"
-    ajv "^6.10.0"
+    ajv "^6.12.4"
     chalk "^4.0.0"
     cross-spawn "^7.0.2"
     debug "^4.3.2"
     doctrine "^3.0.0"
     escape-string-regexp "^4.0.0"
-    eslint-scope "^7.1.1"
-    eslint-visitor-keys "^3.3.0"
-    espree "^9.5.0"
+    eslint-scope "^7.2.2"
+    eslint-visitor-keys "^3.4.3"
+    espree "^9.6.1"
     esquery "^1.4.2"
     esutils "^2.0.2"
     fast-deep-equal "^3.1.3"
@@ -7767,22 +7845,19 @@ eslint@^8.36.0:
     find-up "^5.0.0"
     glob-parent "^6.0.2"
     globals "^13.19.0"
-    grapheme-splitter "^1.0.4"
+    graphemer "^1.4.0"
     ignore "^5.2.0"
-    import-fresh "^3.0.0"
     imurmurhash "^0.1.4"
     is-glob "^4.0.0"
     is-path-inside "^3.0.3"
-    js-sdsl "^4.1.4"
     js-yaml "^4.1.0"
     json-stable-stringify-without-jsonify "^1.0.1"
     levn "^0.4.1"
     lodash.merge "^4.6.2"
     minimatch "^3.1.2"
     natural-compare "^1.4.0"
-    optionator "^0.9.1"
+    optionator "^0.9.3"
     strip-ansi "^6.0.1"
-    strip-json-comments "^3.1.0"
     text-table "^0.2.0"
 
 eslint@^8.7.0:
@@ -7862,14 +7937,14 @@ espree@^9.0.0, espree@^9.3.2:
     acorn-jsx "^5.3.2"
     eslint-visitor-keys "^3.3.0"
 
-espree@^9.5.0:
-  version "9.5.0"
-  resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.0.tgz#3646d4e3f58907464edba852fa047e6a27bdf113"
-  integrity sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==
+espree@^9.6.0, espree@^9.6.1:
+  version "9.6.1"
+  resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f"
+  integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==
   dependencies:
-    acorn "^8.8.0"
+    acorn "^8.9.0"
     acorn-jsx "^5.3.2"
-    eslint-visitor-keys "^3.3.0"
+    eslint-visitor-keys "^3.4.1"
 
 esprima@^4.0.0, esprima@^4.0.1:
   version "4.0.1"
@@ -8897,6 +8972,11 @@ grapheme-splitter@^1.0.4:
   resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e"
   integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==
 
+graphemer@^1.4.0:
+  version "1.4.0"
+  resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6"
+  integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==
+
 growly@^1.3.0:
   version "1.3.0"
   resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
@@ -10655,11 +10735,6 @@ js-levenshtein@^1.1.3:
   resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d"
   integrity sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==
 
-js-sdsl@^4.1.4:
-  version "4.4.0"
-  resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.4.0.tgz#8b437dbe642daa95760400b602378ed8ffea8430"
-  integrity sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==
-
 "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
   version "4.0.0"
   resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
@@ -12807,6 +12882,18 @@ optionator@^0.9.1:
     type-check "^0.4.0"
     word-wrap "^1.2.3"
 
+optionator@^0.9.3:
+  version "0.9.3"
+  resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64"
+  integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==
+  dependencies:
+    "@aashutoshrathi/word-wrap" "^1.2.3"
+    deep-is "^0.1.3"
+    fast-levenshtein "^2.0.6"
+    levn "^0.4.1"
+    prelude-ls "^1.2.1"
+    type-check "^0.4.0"
+
 os-browserify@^0.3.0:
   version "0.3.0"
   resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27"