Skip to content

Commit

Permalink
fix: await trafficDataUsageStore.deleteAll where its being used (#6478)
Browse files Browse the repository at this point in the history
## About the changes

trafficDataUsageStore.deleteAll() wasn't being awaited in tests, leading
to flaky tests. This PR ensures it's being awaited
  • Loading branch information
daveleek committed Mar 8, 2024
1 parent 8f105f9 commit 6f2bd54
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down

0 comments on commit 6f2bd54

Please sign in to comment.