mocha tests, regex validation