Fix the flush() mock so it works if not given a callback.