fix(tests): clear geofence mock before the insignificant-ping assertion

النبضة الأولى في الاختبار ذات دلالة وتنادي الجيوفنس، فالعدّاد لم يكن صفراً
عند فحص النبضة الثانية. خطأ في الاختبار لا في الخدمة.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hamza-Ayed
2026-07-18 19:29:32 +03:00
co-authored by Claude Opus 4.8
parent 4db7af9301
commit 5b101bca57
@@ -58,6 +58,7 @@ describe('DriverLocationService', () => {
await svc.update(TENANT, DRIVER, CLASS, BASE); await svc.update(TENANT, DRIVER, CLASS, BASE);
const tracksBefore = await redis.llen('loc:tracks'); const tracksBefore = await redis.llen('loc:tracks');
matching.setPosition.mockClear(); matching.setPosition.mockClear();
geofence.processLocation.mockClear(); // النبضة الأولى ذات دلالة وقد نادته
// إزاحة مترين — تحت عتبة 10م // إزاحة مترين — تحت عتبة 10م
const r = await svc.update(TENANT, DRIVER, CLASS, { const r = await svc.update(TENANT, DRIVER, CLASS, {