All code should work in both of these environments, and all unit tests are run in both of these environments. Moment was designed to work both in the browser and in Node.js.