From 6f2bd546a62aebe659511f4dd8c9350758e27893 Mon Sep 17 00:00:00 2001 From: David Leek Date: Fri, 8 Mar 2024 13:34:46 +0100 Subject: [PATCH] fix: await trafficDataUsageStore.deleteAll where its being used (#6478) ## About the changes trafficDataUsageStore.deleteAll() wasn't being awaited in tests, leading to flaky tests. This PR ensures it's being awaited --- .../traffic-data-usage/traffic-data-usage-store.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/features/traffic-data-usage/traffic-data-usage-store.test.ts b/src/lib/features/traffic-data-usage/traffic-data-usage-store.test.ts index 6f34a01281..37f19dbe1b 100644 --- a/src/lib/features/traffic-data-usage/traffic-data-usage-store.test.ts +++ b/src/lib/features/traffic-data-usage/traffic-data-usage-store.test.ts @@ -62,7 +62,7 @@ test('upsert upserts', async () => { }); test('getAll returns all', async () => { - trafficDataUsageStore.deleteAll(); + await trafficDataUsageStore.deleteAll(); const data1 = { day: new Date(), trafficGroup: 'default3', @@ -83,7 +83,7 @@ test('getAll returns all', async () => { }); test('delete deletes the specified item', async () => { - trafficDataUsageStore.deleteAll(); + await trafficDataUsageStore.deleteAll(); const data1 = { day: new Date(), trafficGroup: 'default3', @@ -110,7 +110,7 @@ test('delete deletes the specified item', async () => { }); test('can query for specific items', async () => { - trafficDataUsageStore.deleteAll(); + await trafficDataUsageStore.deleteAll(); const data1 = { day: new Date(), trafficGroup: 'default3',