diff --git a/scripts/setupJestEnv.ts b/scripts/setupJestEnv.ts index 95f12615..381a404f 100644 --- a/scripts/setupJestEnv.ts +++ b/scripts/setupJestEnv.ts @@ -80,9 +80,10 @@ afterEach(() => { }) warn.mockRestore() if (nonAssertedWarnings.length) { - nonAssertedWarnings.forEach(warning => { - console.warn(warning) - }) - throw new Error(`test case threw unexpected warnings.`) + throw new Error( + `test case threw unexpected warnings:\n - ${nonAssertedWarnings.join( + '\n - ' + )}` + ) } })