| 1 |
"use strict"; |
| 2 |
|
| 3 |
var noop = require("es5-ext/function/noop") |
| 4 |
, resolve = require("path").resolve; |
| 5 |
|
| 6 |
var pg = resolve(__dirname, "__playground"), n4 = process.version.indexOf("v0.4") === 0; |
| 7 |
|
| 8 |
module.exports = function (t, a, d) { |
| 9 |
if (!n4) { |
| 10 |
d(); |
| 11 |
return; |
| 12 |
} |
| 13 |
var outorg, errorg; |
| 14 |
outorg = process.stdout._writeOut; |
| 15 |
errorg = process.stderr._writeOut; |
| 16 |
process.stdout._writeOut = noop; |
| 17 |
process.stderr._writeOut = noop; |
| 18 |
|
| 19 |
t([ |
| 20 |
"/wrong/path", pg + "/lib/context-error/module.js", pg + "/lib/evaluation-error.js", |
| 21 |
pg + "/lib/test-evaluation-error.js", pg + "/lib/no-tests.js", pg + "/lib/module.js" |
| 22 |
])( |
| 23 |
function () { |
| 24 |
process.stdout._writeOut = outorg; |
| 25 |
process.stderr._writeOut = errorg; |
| 26 |
a.ok(true); |
| 27 |
d(); |
| 28 |
}, |
| 29 |
function (err) { |
| 30 |
process.stdout._writeOut = outorg; |
| 31 |
process.stderr._writeOut = errorg; |
| 32 |
d(err); |
| 33 |
} |
| 34 |
).end(); |
| 35 |
}; |