tests (constants.js): add tests for constants

Closes #245