From 5b101bca57ce34b63b9e00ed1b3a3d42cb9bea04 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Sat, 18 Jul 2026 19:29:32 +0300 Subject: [PATCH] fix(tests): clear geofence mock before the insignificant-ping assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit النبضة الأولى في الاختبار ذات دلالة وتنادي الجيوفنس، فالعدّاد لم يكن صفراً عند فحص النبضة الثانية. خطأ في الاختبار لا في الخدمة. Co-Authored-By: Claude Opus 4.8 --- backend/src/modules/locations/driver-location.service.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/modules/locations/driver-location.service.spec.ts b/backend/src/modules/locations/driver-location.service.spec.ts index 72816d6..9478ea6 100644 --- a/backend/src/modules/locations/driver-location.service.spec.ts +++ b/backend/src/modules/locations/driver-location.service.spec.ts @@ -58,6 +58,7 @@ describe('DriverLocationService', () => { await svc.update(TENANT, DRIVER, CLASS, BASE); const tracksBefore = await redis.llen('loc:tracks'); matching.setPosition.mockClear(); + geofence.processLocation.mockClear(); // النبضة الأولى ذات دلالة وقد نادته // إزاحة مترين — تحت عتبة 10م const r = await svc.update(TENANT, DRIVER, CLASS, {