Create and destroy fake clock on the same `it` function
There seems to be a pattern in our code that if a fake clock is used on a single `it` function, the clock should be created and restored within that function. I think it is beneficial from a readability perspective. On the other hand, if the clock is used in several test functions it should be declared on a parent context and restored on an `afterEach` function. I simplified an unrelated test using async.
Showing
Please register or sign in to comment