Skip to content

Commit 4b1fae5

Browse files
authored
chore: Fix unit tests to work with node 22. (#837)
There was a minor change to the logging output in node 22 for object string conversion. This makes a test more lenient to account for it.
1 parent f83b3f0 commit 4b1fae5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/shared/common/__tests__/logging/format.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ describe.each([
3232
[
3333
'',
3434
[Symbol('foo'), circular, BigInt(7), { apple: 'pie' }, global, undefined, null],
35-
' [Circular] 7n {"apple":"pie"} [object Object] undefined null',
35+
/\[Circular\] 7n {"apple":"pie"} \[.*\] undefined null/,
3636
],
3737
])('given node style format strings', (formatStr, args, result) => {
3838
it('produces the expected string', () => {
39-
expect(format(formatStr, ...args)).toEqual(result);
39+
expect(format(formatStr, ...args)).toMatch(result);
4040
});
4141
});

0 commit comments

Comments
 (0)