Move tests to js file
Refactor tests
Enable running from command-line. Add package.json
Add travis.yml, enable npm test
Merge branch 'travis-ci-integration'