Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Replace cwd with '.'

  • Loading branch information...
commit 1847aefc5679d9f50b01c6b2e7e37b35a1f0db16 1 parent e8209d5
@5long authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/reporter/failure.js
View
7 src/reporter/failure.js
@@ -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.
Something went wrong with that request. Please try again.