summaryrefslogtreecommitdiffstats
path: root/spec/env/runner.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/env/runner.js')
-rw-r--r--spec/env/runner.js24
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) {