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:
parent
4d471ef7be
commit
6656c88546
1 changed files with 4 additions and 3 deletions
|
|
@ -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')}`
|
||||
|
|
|
|||
Loading…
Reference in a new issue