diff --git a/index.js b/index.js index 343d80e7..57f2781a 100644 --- a/index.js +++ b/index.js @@ -114,7 +114,7 @@ function createHarness (conf_) { function onend () { count--; if (this._progeny.length) { - var unshifts = this._progeny.map(function (st) { + var unshifts = map(this._progeny, function (st) { return function () { running = true; out.push(st); @@ -152,4 +152,13 @@ function createHarness (conf_) { return test; } +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i])); + } + return res; +} + // vim: set softtabstop=4 shiftwidth=4: diff --git a/package.json b/package.json index ac33d1e3..04e4f57f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name" : "tape", - "version" : "0.3.2", + "version" : "0.3.3", "description" : "tap-producing test harness for node and browsers", "main" : "index.js", "bin" : "./bin/tape",