diff options
author | Ryan Lewis <ryanharrisonlewis@gmail.com> | 2015-12-13 20:42:13 -0800 |
---|---|---|
committer | Ryan Lewis <ryanharrisonlewis@gmail.com> | 2015-12-13 20:42:13 -0800 |
commit | 21bf95c92a1c04fd8a31742c1ea21ccb2d195c9c (patch) | |
tree | a120f52441e2f62ecb61696a4f67fdc1c15273b4 /spec/env/runner.js | |
parent | cc0b239aafefdef0342334b90f3c9b3ac6b19cea (diff) | |
parent | a6121cae797161f74bdd5a25e0c56379992557d7 (diff) | |
download | handlebars.js-21bf95c92a1c04fd8a31742c1ea21ccb2d195c9c.zip handlebars.js-21bf95c92a1c04fd8a31742c1ea21ccb2d195c9c.tar.gz handlebars.js-21bf95c92a1c04fd8a31742c1ea21ccb2d195c9c.tar.bz2 |
Merge branch 'master' of https://github.com/ryanmurakami/handlebars.js
Diffstat (limited to 'spec/env/runner.js')
-rw-r--r-- | spec/env/runner.js | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/spec/env/runner.js b/spec/env/runner.js index 4ff1e7e..f4b23d8 100644 --- a/spec/env/runner.js +++ b/spec/env/runner.js @@ -7,19 +7,35 @@ var errors = 0, testDir = path.dirname(__dirname), grep = process.argv[2]; +// Lazy hack, but whatever +if (grep === '--min') { + global.minimizedTest = true; + grep = undefined; +} + var files = fs.readdirSync(testDir) .filter(function(name) { return (/.*\.js$/).test(name); }) .map(function(name) { return testDir + '/' + name; }); -run('./runtime', function() { - run('./browser', function() { - run('./node', function() { +if (global.minimizedTest) { + run('./runtime', function() { + run('./browser', function() { /* eslint-disable no-process-exit */ process.exit(errors); /* eslint-enable no-process-exit */ }); }); -}); +} else { + run('./runtime', function() { + run('./browser', function() { + run('./node', function() { + /* eslint-disable no-process-exit */ + process.exit(errors); + /* eslint-enable no-process-exit */ + }); + }); + }); +} function run(env, callback) { |