Handle newlines in error messages, fixes #1495
This commit is contained in:
parent
7f2ff03ecf
commit
69045af46c
3 changed files with 23 additions and 1 deletions
|
|
@ -149,6 +149,18 @@ o.spec("ospec", function() {
|
|||
})
|
||||
})
|
||||
|
||||
o.spec('stack trace cleaner', function() {
|
||||
o('handles line breaks', function() {
|
||||
try {
|
||||
throw new Error('line\nbreak')
|
||||
} catch(error) {
|
||||
var trace = o.cleanStackTrace(error.stack)
|
||||
o(trace).notEquals('break')
|
||||
o(trace.includes("test-ospec.js")).equals(true)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
o.spec("async promise", function() {
|
||||
var a = 0, b = 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue