Since the race condition was fixed when I ensured the elevator was only moving once at any given time, there is no need to clear the event listeners between each test since we start with a new object before each tests. I also switched to using once() instead of on() for the 'isIdle' event since in all cases we only expect this to be called... err... once!
Since the race condition was fixed when I ensured the elevator was only moving
once at any given time, there is no need to clear the event listeners between
each test since we start with a new object before each tests. I also switched to
using once() instead of on() for the 'isIdle' event since in all cases we only
expect this to be called... err... once!

bencawkwell/node-elevator