Permalink
Browse files

On Webkit, add file/line no to test failures caused by errors

  • Loading branch information...
1 parent fdfba6d commit 328780de299eabb4795eff8e04a87c33769ca1ab @marijnh marijnh committed Sep 10, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 test/driver.js
View
5 test/driver.js
@@ -89,7 +89,10 @@ function runTests(callback) {
} catch(e) {
if (expFail) callback("expected", test.name);
else if (e instanceof Failure) callback("fail", test.name, e.message);
- else callback("error", test.name, e.toString());
+ else {
+ var pos = /\bat .*?([^\/:]+):(\d+):/.exec(e.stack);
+ callback("error", test.name, e.toString() + (pos ? " (" + pos[1] + ":" + pos[2] + ")" : ""));
+ }
}
if (!quit) { // Run next test
var delay = 0;

0 comments on commit 328780d

Please sign in to comment.