mocha test passed for javascript string exercieses