From 56ea3eb7254311a0bfb7e17abfe55cdd37014f41 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 27 Feb 2026 03:11:29 +0100 Subject: [PATCH] fix(tests): align mock delete/stop signatures with async ChargingStation interface - Change delete() to async, return Promise, await stop() - Change stop() to async, return Promise - Add await Promise.resolve() for lint compliance in mock --- tests/charging-station/ChargingStationTestUtils.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/charging-station/ChargingStationTestUtils.ts b/tests/charging-station/ChargingStationTestUtils.ts index b595054b..ca39f17e 100644 --- a/tests/charging-station/ChargingStationTestUtils.ts +++ b/tests/charging-station/ChargingStationTestUtils.ts @@ -561,9 +561,9 @@ export function createRealChargingStation ( } }, connectors, - delete (deleteConfiguration = true): void { + async delete (deleteConfiguration = true): Promise { if (this.started) { - this.stop() + await this.stop() } this.requests.clear() this.connectors.clear() @@ -731,10 +731,11 @@ export function createRealChargingStation ( templateIndex: index, templateName: templateFile, }, - stop (): void { + async stop (): Promise { if (this.started && !this.stopping) { this.stopping = true - // Simulate real stop behavior + // Simulate async stop behavior (immediate resolution for tests) + await Promise.resolve() this.closeWSConnection() delete this.bootNotificationResponse this.started = false -- 2.53.0