Describe the bug
The default logger will log an error to console on failed network requests, eg:
https://github.com/tannerlinsley/react-query/blob/6bbb3710e5fae3bd8c425048be3a2b7f14c29100/src/core/mutation.ts#L196
While this makes sense for dev/prod use, when writing tests it produces unnecessary noise. Errors are logged to the console even for passing tests.
Expected behavior
Either the logger should switch to a null logger when process.env.NODE_ENV === 'test', or the testing docs should be amended to instruct developers to do something like:
import { setLogger } from 'react-query'
let noop = () => {}
beforeAll(() => {
setLogger({
log: noop,
warn: noop,
error: noop
})
})