diff --git a/src/__tests__/fake-timers.js b/src/__tests__/fake-timers.js
index 6cf7ca5f..d553f081 100644
--- a/src/__tests__/fake-timers.js
+++ b/src/__tests__/fake-timers.js
@@ -1,4 +1,4 @@
-import {waitFor, waitForElementToBeRemoved} from '..'
+import {configure, getConfig, waitFor, waitForElementToBeRemoved} from '..'
 import {render} from './helpers/test-utils'
 
 async function runWaitFor({time = 300} = {}, options) {
@@ -11,8 +11,14 @@ async function runWaitFor({time = 300} = {}, options) {
   await waitFor(() => expect(result).toBe(response), options)
 }
 
+let originalConfig
+beforeAll(() => {
+  originalConfig = getConfig()
+})
+
 afterEach(() => {
   jest.useRealTimers()
+  configure(originalConfig)
 })
 
 test('real timers', async () => {
@@ -43,6 +49,23 @@ test('fake timer timeout', async () => {
   ).rejects.toMatchInlineSnapshot(`[Error: always throws]`)
 })
 
+test('fake timer timeout uses default ontimeout', async () => {
+  configure({
+    defaultOnTimeout: _ => {
+      return Error('Test Error')
+    },
+  })
+  jest.useFakeTimers()
+  await expect(
+    waitFor(
+      () => {
+        throw new Error('always throws')
+      },
+      {timeout: 10},
+    ),
+  ).rejects.toMatchInlineSnapshot(`[Error: Test Error]`)
+})
+
 test('times out after 1000ms by default', async () => {
   const startReal = performance.now()
   jest.useFakeTimers()
diff --git a/src/wait-for.js b/src/wait-for.js
index ab2c9989..b09648de 100644
--- a/src/wait-for.js
+++ b/src/wait-for.js
@@ -24,6 +24,9 @@ function waitFor(
     stackTraceError,
     interval = 50,
     onTimeout = error => {
+      if (getConfig().defaultOnTimeout) {
+        return getConfig().defaultOnTimeout(error)
+      }
       Object.defineProperty(error, 'message', {
         value: getConfig().getElementError(error.message, container).message,
       })
diff --git a/types/config.d.ts b/types/config.d.ts
index c3617ef0..a127f730 100644
--- a/types/config.d.ts
+++ b/types/config.d.ts
@@ -14,6 +14,7 @@ export interface Config {
   defaultHidden: boolean
   /** default value for the `ignore` option in `ByText` queries */
   defaultIgnore: string
+  defaultOnTimeout?: (error: Error) => Error
   showOriginalStackTrace: boolean
   throwSuggestions: boolean
   getElementError: (message: string | null, container: Element) => Error