From 6656c885467e220e57d593b34b11e44b492638fc Mon Sep 17 00:00:00 2001 From: iliya Date: Tue, 3 Mar 2026 01:21:48 +0200 Subject: [PATCH] refactor: improve error handling in test setup for console warnings and errors - Reformatted the expectation for unexpected console.error calls to enhance readability and maintain consistency in test assertions. --- test/setup.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/setup.ts b/test/setup.ts index 194e2e97..9984d4b6 100644 --- a/test/setup.ts +++ b/test/setup.ts @@ -44,9 +44,10 @@ afterEach(() => { errorSpy.mockRestore(); warnSpy.mockRestore(); - expect(unexpectedErrors, `Unexpected console.error calls:\n${unexpectedErrors.join('\n')}`).toEqual( - [] - ); + expect( + unexpectedErrors, + `Unexpected console.error calls:\n${unexpectedErrors.join('\n')}` + ).toEqual([]); expect( unexpectedWarnings, `Unexpected console.warn calls:\n${unexpectedWarnings.join('\n')}`