Added test

Thanks for this module. I added a simple `tape` test and increased the timeout in `example.js` -  it would occasionally fail.