diff --git a/lib/reporters/machineout.js b/lib/reporters/machineout.js index 8e611fe47..d9a7c4d5d 100644 --- a/lib/reporters/machineout.js +++ b/lib/reporters/machineout.js @@ -58,7 +58,10 @@ exports.run = function (files, options, callback) { if (delimiter === undefined) { delimiter = ':'; } - traceback = stack.split('\n'); + traceback = stack.split(/\n/).filter(function (line) { + // exclude line of "types.js" + return ! RegExp(/nodeunit\/lib\/types.js:/).test(line); + }); firstline = traceback.shift(); trace = parseTrace(traceback[0]); return {filename: trace.filename, row: trace.row, column: trace.column, message: firstline};