Skip to content

Commit

Permalink
add missing await
Browse files Browse the repository at this point in the history
  • Loading branch information
guanzo committed Sep 6, 2023
1 parent 5586566 commit ced3e53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ describe('Saturn client', () => {
})

it('should fail to fetch non CID', async () => {
assert.rejects(client.fetchCID('a'))
await assert.rejects(client.fetchCID('a'))
})

it('should fail when exceeding connection timeout', async () => {
assert.rejects(client.fetchCID('QmXjYBY478Cno4jzdCcPy4NcJYFrwHZ51xaCP8vUwN9MGm', { connectTimeout: 1 }))
await assert.rejects(client.fetchCID('QmXjYBY478Cno4jzdCcPy4NcJYFrwHZ51xaCP8vUwN9MGm', { connectTimeout: 1 }))
})

it('should fail when exceeding download timeout', async () => {
assert.rejects(client.fetchCID('QmXjYBY478Cno4jzdCcPy4NcJYFrwHZ51xaCP8vUwN9MGm', { downloadTimeout: 0 }))
await assert.rejects(client.fetchCID('QmXjYBY478Cno4jzdCcPy4NcJYFrwHZ51xaCP8vUwN9MGm', { downloadTimeout: 0 }))
})
})
})

0 comments on commit ced3e53

Please sign in to comment.