duo: get tests passing on both node and the browser

think I'm a fan of the try...catch imo.