Skip to content

Commit

Permalink
add missing await
Browse files Browse the repository at this point in the history
  • Loading branch information
idleberg committed Oct 20, 2023
1 parent 1cfb809 commit 786550d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tests/indexedDB.entries.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.before.each(async () => {
});

test('true', async () => {
Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));
await Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));

const actual = await db.entries();
const expected = values.map(item => {
Expand All @@ -30,7 +30,7 @@ test('true', async () => {
});

test('false', async () => {
Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));
await Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));

await db.clear();
const actual = await db.entries();
Expand Down
4 changes: 2 additions & 2 deletions tests/indexedDB.hasItem.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.before.each(async () => {
});

test('true', async () => {
Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));
await Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));

const actual = await db.hasItem('demo1');
const expected = true;
Expand All @@ -28,7 +28,7 @@ test('true', async () => {
});

test('false', async () => {
Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));
await Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));

await db.clear();
const actual = await db.hasItem('demo1');
Expand Down
4 changes: 2 additions & 2 deletions tests/indexedDB.keys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.before.each(async () => {
});

test('true', async () => {
Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));
await Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));

const actual = await db.keys();
const expected = ['demo1', 'demo2', 'demo3'];
Expand All @@ -28,7 +28,7 @@ test('true', async () => {
});

test('false', async () => {
Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));
await Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));

await db.clear();
const actual = await db.keys();
Expand Down
4 changes: 2 additions & 2 deletions tests/indexedDB.values.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test.before.each(async () => {
});

test('true', async () => {
Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));
await Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));

const actual = await db.values();
const expected = values;
Expand All @@ -28,7 +28,7 @@ test('true', async () => {
});

test('false', async () => {
Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));
await Promise.all(values.map(async item => await db.setItem(`demo${item}`, item)));

await db.clear();
const actual = await db.values();
Expand Down

0 comments on commit 786550d

Please sign in to comment.