tests work in browser and node