Run tests on the command line

Allows the tests to be run on the command line using `npm test`.