Permalink
Browse files

Replace cwd with '.'

  • Loading branch information...
1 parent e8209d5 commit 1847aefc5679d9f50b01c6b2e7e37b35a1f0db16 @5long committed Dec 3, 2010
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/reporter/failure.js
View
@@ -23,10 +23,9 @@ util.merge(FailureReporter.prototype, {
this._output.write(this._format(result, t, suite))
}
, _format: function(result, t, suite) {
- // Assuming path seperator is "/"
- // and the format of stack trace remains.
- var matched = result.stack.match(/([^\/]+:\d+:\d+)/)
- , source = matched && matched[1]
+ // Assuming the format of stack trace remains
+ var matched = result.stack.match(/\n\s*at ([^:]+:\d+:\d+)/)
+ , source = matched && matched[1].replace(process.cwd(), ".")
return [ "Assertion fail at"
, source
, result.message

0 comments on commit 1847aef

Please sign in to comment.