From b445478269c3b385e9435c9b9c68f0222ab90ad7 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Tue, 29 Apr 2025 15:37:31 -0700 Subject: [PATCH 1/2] chore: Fix unit tests to work with node 22. --- packages/shared/common/__tests__/logging/format.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/shared/common/__tests__/logging/format.test.ts b/packages/shared/common/__tests__/logging/format.test.ts index 9ddc3ef05d..47a4f19b91 100644 --- a/packages/shared/common/__tests__/logging/format.test.ts +++ b/packages/shared/common/__tests__/logging/format.test.ts @@ -32,10 +32,10 @@ describe.each([ [ '', [Symbol('foo'), circular, BigInt(7), { apple: 'pie' }, global, undefined, null], - ' [Circular] 7n {"apple":"pie"} [object Object] undefined null', + /\[Circular\] 7n {"apple":"pie"} \[.*\] undefined null/, ], ])('given node style format strings', (formatStr, args, result) => { it('produces the expected string', () => { - expect(format(formatStr, ...args)).toEqual(result); + expect(format(formatStr, ...args)).toMatch(result); }); }); From d6669c19aa8717c8349499106d04e200e02bd886 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Tue, 29 Apr 2025 15:41:10 -0700 Subject: [PATCH 2/2] Lint --- packages/shared/common/__tests__/logging/format.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/shared/common/__tests__/logging/format.test.ts b/packages/shared/common/__tests__/logging/format.test.ts index 47a4f19b91..daa715906d 100644 --- a/packages/shared/common/__tests__/logging/format.test.ts +++ b/packages/shared/common/__tests__/logging/format.test.ts @@ -32,7 +32,7 @@ describe.each([ [ '', [Symbol('foo'), circular, BigInt(7), { apple: 'pie' }, global, undefined, null], - /\[Circular\] 7n {"apple":"pie"} \[.*\] undefined null/, + /\[Circular\] 7n {"apple":"pie"} \[.*\] undefined null/, ], ])('given node style format strings', (formatStr, args, result) => { it('produces the expected string', () => {