From efeb46596faccf917c4ffc742da13e31f49cae2d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 27 Feb 2026 21:05:21 +0100 Subject: [PATCH] fix(tests): bind method reference in ClearCache test - Use .bind() for deleteIdTags method reference (line 89) - Ensures proper 'this' context when method is restored and called - Reduces lint errors from 41 to 40 (1 error fixed) - All 291 tests still passing --- .../ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts index 1fb02a07..d1e9b2f6 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts @@ -86,7 +86,7 @@ await describe('C11 - Clear Authorization Data in Authorization Cache', async () await it('Should NOT call idTagsCache.deleteIdTags() on ClearCache request', async () => { // Verify that IdTagsCache is not touched let deleteIdTagsCalled = false - const originalDeleteIdTags = mockChargingStation.idTagsCache.deleteIdTags + const originalDeleteIdTags = mockChargingStation.idTagsCache.deleteIdTags.bind(mockChargingStation.idTagsCache) Object.assign(mockChargingStation.idTagsCache, { deleteIdTags: () => { -- 2.43.0