Skip to content

Commit

Permalink
chore: use Promise.all
Browse files Browse the repository at this point in the history
  • Loading branch information
jayree committed Jun 19, 2023
1 parent 558bf04 commit ff231e1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions __tests__/test-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,11 @@ describe('status', () => {
const { fs, dir } = await makeFixture('test-empty')
const file = 'a.txt'

await fs.write(path.join(dir, file), 'Hi')
await add({ fs, dir, filepath: file })
await fs.write(path.join(dir, file), 'Ho')
await Promise.all([
await fs.write(path.join(dir, file), 'Hi'),
await add({ fs, dir, filepath: file }),
await fs.write(path.join(dir, file), 'Ho'),
])

// Test
const a = await status({ fs, dir, filepath: file })
Expand Down

0 comments on commit ff231e1

Please sign in to comment.