Tests rewriter in mocha/chai