Refactoring tests and migrating CommandsSpec from jasmine to mocha