Since close is async, avoid side effect in the test