browser test works as well as node mock