Improve mocha testing framework for testing main API commands