From ced3e53ebd9ea8b09b2a978effeb8ad4f8e616cf Mon Sep 17 00:00:00 2001 From: Eric Guan Date: Wed, 6 Sep 2023 12:22:47 -0700 Subject: [PATCH] add missing await --- test/test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test.js b/test/test.js index 5c552c3..633bd5b 100644 --- a/test/test.js +++ b/test/test.js @@ -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 })) }) }) })