Append uncaughtException listener to process to avoid crash.
Fix bugs in the test cases' code,to help generate a stable result.
Update Mocha version to avoid stoping while test case failed.