We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1676502 commit 5981fb7Copy full SHA for 5981fb7
lib/assert.js
@@ -269,7 +269,7 @@ function getErrMessage(message, fn) {
269
const call = err.stack[0];
270
271
const filename = call.getFileName();
272
- const line = call.getLineNumber() - 1;
+ let line = call.getLineNumber() - 1;
273
let column = call.getColumnNumber() - 1;
274
let identifier;
275
let code;
@@ -289,6 +289,9 @@ function getErrMessage(message, fn) {
289
return message;
290
}
291
code = String(fn);
292
+ // For functions created with the Function constructor, V8 does not count
293
+ // the lines containing the function header.
294
+ line += 2;
295
identifier = `${code}${line}${column}`;
296
297
0 commit comments