updated mocha snippet