Added a test to check that the setInterval is cleared when poll.close() is called