jest settimeout inside settimeout code example
Example 1: jest timeout
beforeEach(function () {
jest.setTimeout(2000) // ms
});
Example 2: jest timeout
jest.advanceTimersByTime(msToRun)
beforeEach(function () {
jest.setTimeout(2000) // ms
});
jest.advanceTimersByTime(msToRun)