A factory for building mocha files