diff --git a/lib/reporters/default.js b/lib/reporters/default.js index 683b66ded..75977274b 100644 --- a/lib/reporters/default.js +++ b/lib/reporters/default.js @@ -22,6 +22,11 @@ var nodeunit = require('../nodeunit'), exports.info = "Default tests reporter"; +Error.prepareStackTrace = function(error, structuredStackTrace) { + // our invocation will be at the second level of the stack trace + var our = structuredStackTrace[1]; + return "\nat " + our.getFileName() + " line " + our.getLineNumber(); +} /** * Run all tests within each module, reporting the results to the command-line.