From c187bed711a89b50bf9a1b1411daba5c0562b547 Mon Sep 17 00:00:00 2001 From: Zain Date: Thu, 19 Mar 2026 19:01:27 +0800 Subject: [PATCH] test: tighten clear behavior assertions --- tests/unit/diagnostic-log-store.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/diagnostic-log-store.test.ts b/tests/unit/diagnostic-log-store.test.ts index eee73f1..d95789f 100644 --- a/tests/unit/diagnostic-log-store.test.ts +++ b/tests/unit/diagnostic-log-store.test.ts @@ -59,6 +59,8 @@ describe('DiagnosticLogStore', () => { await store.clear(); - expect(mockChromeStorage.remove).toHaveBeenCalledWith(DIAGNOSTIC_STORAGE_KEYS.RECENT_LOGS); + expect(mockChromeStorage.remove).toHaveBeenCalledTimes(1); + expect(mockChromeStorage.remove).toHaveBeenNthCalledWith(1, DIAGNOSTIC_STORAGE_KEYS.RECENT_LOGS); + expect(mockChromeStorage.remove).not.toHaveBeenCalledWith(DIAGNOSTIC_STORAGE_KEYS.LAST_FAILURE); }); });