From: Jérôme Benoit Date: Mon, 11 May 2026 21:30:32 +0000 (+0200) Subject: fix(test): mock router.push to return Promise in all test files X-Git-Tag: cli@v4.7.3~8 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7e924f708315728b3921be758749a943bd73b389;p=e-mobility-charging-stations-simulator.git fix(test): mock router.push to return Promise in all test files --- diff --git a/ui/web/tests/unit/skins/classic/Actions.test.ts b/ui/web/tests/unit/skins/classic/Actions.test.ts index 1406ca18..7ea5b821 100644 --- a/ui/web/tests/unit/skins/classic/Actions.test.ts +++ b/ui/web/tests/unit/skins/classic/Actions.test.ts @@ -16,7 +16,7 @@ import { toastMock } from '../../../setup.js' import { createUIServerConfig, TEST_HASH_ID, TEST_STATION_ID } from '../../constants.js' import { ButtonStub, createMockUIClient, type MockUIClient } from '../../helpers.js' -const mockPush = vi.fn() +const mockPush = vi.fn().mockResolvedValue(undefined) const mockRoute = ref<{ name: string params: Record diff --git a/ui/web/tests/unit/skins/classic/CSTable.test.ts b/ui/web/tests/unit/skins/classic/CSTable.test.ts index 511326e7..120baf70 100644 --- a/ui/web/tests/unit/skins/classic/CSTable.test.ts +++ b/ui/web/tests/unit/skins/classic/CSTable.test.ts @@ -11,7 +11,7 @@ import CSTable from '@/skins/classic/components/charging-stations/CSTable.vue' import { createChargingStationData } from '../../constants.js' import { createMockUIClient, type MockUIClient } from '../../helpers.js' -const mockPush = vi.fn() +const mockPush = vi.fn().mockResolvedValue(undefined) vi.mock('vue-router', () => ({ useRoute: () => ({ name: 'charging-stations', params: {}, query: {} }),