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.
This commit is contained in:
iliya 2026-03-03 01:21:48 +02:00
parent 4d471ef7be
commit 6656c88546

View file

@ -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')}`