Test with mocha

run `npm install mocha -g` and `mocha test` to test all test files under test directory.