diff --git a/src/__tests__/wait-for.js b/src/__tests__/wait-for.js index c0e9b5ec..c1198e33 100644 --- a/src/__tests__/wait-for.js +++ b/src/__tests__/wait-for.js @@ -11,6 +11,17 @@ function deferred() { return {promise, resolve, reject} } +let originalConfig +beforeEach(() => { + originalConfig = getConfig() +}) + +afterEach(() => { + configure(originalConfig) + // restore timers + jest.useRealTimers() +}) + test('waits callback to not throw an error', async () => { const spy = jest.fn() // we are using random timeout here to simulate a real-time example @@ -138,7 +149,6 @@ Ignored nodes: comments,