Skip to content

Commit

Permalink
fix: strip jasmine from stack traces
Browse files Browse the repository at this point in the history
Since Karma uses SHAs rather than timestamps.
  • Loading branch information
vojtajina committed Dec 18, 2013
1 parent 07dfd63 commit 802d503
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var formatFailedStep = function(step) {
}

// remove jasmine stack entries
return stack.replace(/\n.+jasmine\.js\?\d*\:.+(?=(\n|$))/g, '');
return stack.replace(/\n.+jasmine\.js\?\w*\:.+(?=(\n|$))/g, '');
}

return message;
Expand Down
4 changes: 2 additions & 2 deletions test/adapter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ describe('jasmine adapter', function() {
message: "Error: Expected 'function' to be 'fxunction'",
trace: {
stack: "Error: Expected 'function' to be 'fxunction'.\n" +
" at new <anonymous> (http://localhost:8080/lib/jasmine/jasmine.js?123412234:102:32)\n" +
" at [object Object].toBe (http://localhost:8080/lib/jasmine/jasmine.js?123:1171:29)\n" +
" at new <anonymous> (http://localhost:8080/lib/jasmine/jasmine.js?123412asd:102:32)\n" +
" at [object Object].toBe (http://localhost:8080/lib/jasmine/jasmine.js?12sd3:1171:29)\n" +
" at [object Object].<anonymous> (http://localhost:8080/test/resourceSpec.js:2:3)\n" +
" at [object Object].execute (http://localhost:8080/lib/jasmine/jasmine.js?123:1001:15)"
}
Expand Down

0 comments on commit 802d503

Please sign in to comment.