]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
fix(test): mock router.push to return Promise in all test files
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 11 May 2026 21:30:32 +0000 (23:30 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 11 May 2026 21:30:32 +0000 (23:30 +0200)
ui/web/tests/unit/skins/classic/Actions.test.ts
ui/web/tests/unit/skins/classic/CSTable.test.ts

index 1406ca18cfb762ff657904638d325b7c1e7414dc..7ea5b8214c96f34b3d15e205ddfea614fb051e53 100644 (file)
@@ -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<string, string>
index 511326e7350a462a8441c857df9ce6f809a75b67..120baf7039f5351255c1ef9e8ff4b22500522e83 100644 (file)
@@ -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: {} }),