Fixes mochaTest:docs

Includes code from PR #705