mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
22 lines
561 B
JavaScript
22 lines
561 B
JavaScript
/* eslint-disable no-console */
|
|
|
|
import '@testing-library/jest-dom/extend-expect'
|
|
import '@testing-library/react/cleanup-after-each'
|
|
|
|
// this is just a little hack to silence a warning that we'll get until we
|
|
// upgrade to 16.9: https://github.com/facebook/react/pull/14853
|
|
const originalError = console.error
|
|
|
|
beforeAll(() => {
|
|
console.error = (...args) => {
|
|
if (/Warning.*not wrapped in act/.test(args[0])) {
|
|
return
|
|
}
|
|
originalError.call(console, ...args)
|
|
}
|
|
})
|
|
|
|
afterAll(() => {
|
|
console.error = originalError
|
|
})
|