Sometimes tests will repeat the same call multiple times.
When recording, each requests should be memoized so that the single response is used once.
Alternatively, every call could be intercepted & put into a queue, which is then handled until it's empty.
That way every call (removing process.nextTick) happens in a serial fashion.
Sometimes tests will repeat the same call multiple times.
When recording, each requests should be memoized so that the single response is used once.
Alternatively, every call could be intercepted & put into a queue, which is then handled until it's empty.
That way every call (removing
process.nextTick) happens in a serial fashion.