Adding test coverage to the project

Copied from aestimia almost directly.

Coverage is currently 94% because not all of `logger.js` is covered. We can decide if we should cover it, or exclude `logger.js` from coverage and then enforce an "always 100%" rule, if we want.

@toolness @andrewhayward