HTML reporter: show debug logs with white-space: pre
This commit is contained in:
@@ -463,7 +463,11 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|||||||
'tr',
|
'tr',
|
||||||
{},
|
{},
|
||||||
createDom('td', {}, entry.timestamp.toString()),
|
createDom('td', {}, entry.timestamp.toString()),
|
||||||
createDom('td', {}, entry.message)
|
createDom(
|
||||||
|
'td',
|
||||||
|
{ className: 'jasmine-debug-log-msg' },
|
||||||
|
entry.message
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -295,4 +295,7 @@ body {
|
|||||||
}
|
}
|
||||||
.jasmine_html-reporter .jasmine-debug-log table, .jasmine_html-reporter .jasmine-debug-log th, .jasmine_html-reporter .jasmine-debug-log td {
|
.jasmine_html-reporter .jasmine-debug-log table, .jasmine_html-reporter .jasmine-debug-log th, .jasmine_html-reporter .jasmine-debug-log td {
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
.jasmine_html-reporter .jasmine-debug-log .jasmine-debug-log-msg {
|
||||||
|
white-space: pre;
|
||||||
}
|
}
|
||||||
@@ -159,6 +159,8 @@ describe('ExceptionFormatter', function() {
|
|||||||
jasmineFile: jasmine.util.jasmineFile()
|
jasmineFile: jasmine.util.jasmineFile()
|
||||||
});
|
});
|
||||||
const result = subject.stack(error);
|
const result = subject.stack(error);
|
||||||
|
jasmine.debugLog('Original stack trace: ' + error.stack);
|
||||||
|
jasmine.debugLog('Filtered stack trace: ' + result);
|
||||||
const lines = result.split('\n');
|
const lines = result.split('\n');
|
||||||
|
|
||||||
if (lines[0].match(/an error/)) {
|
if (lines[0].match(/an error/)) {
|
||||||
|
|||||||
@@ -430,7 +430,11 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|||||||
'tr',
|
'tr',
|
||||||
{},
|
{},
|
||||||
createDom('td', {}, entry.timestamp.toString()),
|
createDom('td', {}, entry.timestamp.toString()),
|
||||||
createDom('td', {}, entry.message)
|
createDom(
|
||||||
|
'td',
|
||||||
|
{ className: 'jasmine-debug-log-msg' },
|
||||||
|
entry.message
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -424,5 +424,9 @@ body {
|
|||||||
table, th, td {
|
table, th, td {
|
||||||
border: 1px solid #ddd;
|
border: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jasmine-debug-log-msg {
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user