diff --git a/packages/core/utils/lib/__tests__/async.test.js b/packages/core/utils/lib/__tests__/async.test.js index 8f4bb5eedf..882f66e0db 100644 --- a/packages/core/utils/lib/__tests__/async.test.js +++ b/packages/core/utils/lib/__tests__/async.test.js @@ -100,7 +100,7 @@ describe('Async utils', () => { expect(result).toEqual(13); }); - test('Should throw an error', async () => { + test('Should throw an error with proper message when the provided callback throws an error', async () => { const numberPromiseArray = [Promise.resolve(1), Promise.resolve(2)]; const reduceFunc = reduceAsync(numberPromiseArray); @@ -111,7 +111,7 @@ describe('Async utils', () => { }, null); }).rejects.toThrow('test'); }); - test('Should throw an error 2', async () => { + test('Should throw an error with proper message when the input array contains a rejected Promise', async () => { const numberPromiseArray = [Promise.reject(new Error('input')), Promise.resolve(2)]; const reduceFunc = reduceAsync(numberPromiseArray);