diff --git a/scripts/helpers.js b/scripts/helpers.js index 7f7d1646eff..7fca63f4661 100644 --- a/scripts/helpers.js +++ b/scripts/helpers.js @@ -177,7 +177,9 @@ Module.prototype.runUnitTests = function() { * Runs snippet tests for this module. */ Module.prototype.runSnippetTests = function() { - run(['TEST_MODULE=' + this.name, 'mocha test/docs.js'], { cwd: ROOT_DIR }); + process.env.TEST_MODULE = this.name; + run('mocha test/docs.js', { cwd: ROOT_DIR }); + delete process.env.TEST_MODULE; }; /**