js/lcn/utils.js: use captureStackTrace if available
This commit is contained in:
parent
e9228892fa
commit
733aad3bf2
|
@ -8,8 +8,7 @@ const assert = {
|
|||
if (actual !== expected) {
|
||||
const err = new Error(`Assertion Failed. ${message}`)
|
||||
err.data = { actual, expected}
|
||||
// Seems like there's no such thing as captureStackTrace in firefox?
|
||||
//Error.captureStackTrace(err, assert.equal)
|
||||
Error.captureStackTrace?.(err, assert.equal)
|
||||
debugger
|
||||
throw err
|
||||
}
|
||||
|
@ -18,7 +17,7 @@ const assert = {
|
|||
if (!actual) {
|
||||
const err = new Error(`Assertion Failed. ${message}`)
|
||||
err.data = { actual }
|
||||
// Error.captureStackTrace(err, assert.ok)
|
||||
Error.captureStackTrace?.(err, assert.ok)
|
||||
debugger
|
||||
throw err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue