From a0e32dc3d201b8f5d3aad99f97de7f1462ea946f Mon Sep 17 00:00:00 2001 From: Julian Dax Date: Thu, 23 Feb 2023 00:14:44 +0100 Subject: [PATCH] fix: fix unit tests on Node 14 at least I hope it does :D --- packages/jest-message-util/src/__tests__/messages.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jest-message-util/src/__tests__/messages.test.ts b/packages/jest-message-util/src/__tests__/messages.test.ts index 21d33c9d0a83..55087aeeba80 100644 --- a/packages/jest-message-util/src/__tests__/messages.test.ts +++ b/packages/jest-message-util/src/__tests__/messages.test.ts @@ -435,7 +435,7 @@ it('should return the error cause if there is one', () => { it('should return the inner errors of an AggregateError', () => { // TODO remove this if when the lowest supported Node version is 15.0.0 // See https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V15.md#v8-86---35415 - if (AggregateError) { + if (typeof AggregateError !== 'undefined') { const aggError = new AggregateError([ new Error('Err 1'), new Error('Err 2'),