ReferenceError: indexedDB is not defined when testing React component with Jest

I have created a React App using Create React App, it uses IndexedDB.

When I try to run a test I’m getting this error:

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "ReferenceError: indexedDB is not defined".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

I understand that the testing suit is run in a headless browser that doesn’t have IndexedDB. How can I handle this case?