Setup project for unit testing.

To run unit tests, run
$ npm install
$ npm test
Added basic testing of events and request replay.