Ticket #9231: line.patch
| File line.patch, 0.6 kB (added by jeresig, 3 years ago) |
|---|
-
test/lib/unittest.js
old new 277 277 }, 278 278 fail: function(message) { 279 279 this.failures++; 280 this.messages.push("Failure: " + message); 280 281 var line = ""; 282 try { 283 throw new Error("stack"); 284 } catch(e){ 285 line = (/\.html:(\d+)/.exec(e.stack || '') || ['',''])[1]; 286 } 287 288 this.messages.push("Failure: " + message + (line ? " Line #" + line : "")); 281 289 }, 282 290 info: function(message) { 283 291 this.messages.push("Info: " + message);