From 24f86cc6cee403cb859e1c614a0639ee2f0fa2d2 Mon Sep 17 00:00:00 2001 From: mausworks Date: Wed, 24 Nov 2021 02:09:00 +0100 Subject: [PATCH] fix: use 'Rejects' instead of 'Throws' --- src/__tests__/promises.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/__tests__/promises.test.ts b/src/__tests__/promises.test.ts index 723fe0799..39225e30a 100644 --- a/src/__tests__/promises.test.ts +++ b/src/__tests__/promises.test.ts @@ -173,13 +173,13 @@ describe('Promises API', () => { const stat = await vol.lstat('/foo', { throwIfNoEntry: false }); expect(stat).toBeUndefined(); }); - it('Throws when entry does not exist if throwIfNoEntry is true', async () => { + it('Rejects when entry does not exist if throwIfNoEntry is true', async () => { await expect(vol.lstat('/foo', { throwIfNoEntry: true })).rejects.toBeInstanceOf(Error); }); - it('Throws when entry does not exist if throwIfNoEntry is not specified', async () => { + it('Rejects when entry does not exist if throwIfNoEntry is not specified', async () => { await expect(vol.lstat('/foo')).rejects.toBeInstanceOf(Error); }); - it('Throws when entry does not exist if throwIfNoEntry is explicitly undefined', async () => { + it('Rejects when entry does not exist if throwIfNoEntry is explicitly undefined', async () => { await expect(vol.lstat('/foo', { throwIfNoEntry: undefined })).rejects.toBeInstanceOf(Error); }); });