- added browser-only switch so tests won't break in nodejs