duo: get tests passing on both node and the browser