wrote some unit test for mocha