Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

: Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout.Error:

// add this in your test


beforeEach(() => {
  jest.useFakeTimers()
  jest.setTimeout(100000)
})

afterEach(() => {
  jest.clearAllTimers()
})
 
PREVIOUS NEXT
Tagged: #Timeout #Async #callback #invoked #ms #timeout #Async #callback #invoked #ms #timeout
ADD COMMENT
Topic
Name
9+9 =