• Eduardo Sanz García's avatar
    Create and destroy fake clock on the same `it` function · a421fc26
    Eduardo Sanz García authored
    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.
    a421fc26
Menu-test.js 7.54 KB