mocha test passed for javascript functions exercieses