test: improve unexpected warning output
This commit is contained in:
parent
7e8b26eba8
commit
a5e55e28f1
@ -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 - '
|
||||
)}`
|
||||
)
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user