diff --git a/lib/jasmine-core/jasmine-html.js b/lib/jasmine-core/jasmine-html.js index 0be90bff..19075ee7 100644 --- a/lib/jasmine-core/jasmine-html.js +++ b/lib/jasmine-core/jasmine-html.js @@ -463,7 +463,11 @@ jasmineRequire.HtmlReporter = function(j$) { 'tr', {}, createDom('td', {}, entry.timestamp.toString()), - createDom('td', {}, entry.message) + createDom( + 'td', + { className: 'jasmine-debug-log-msg' }, + entry.message + ) ) ); }); diff --git a/lib/jasmine-core/jasmine.css b/lib/jasmine-core/jasmine.css index 1f364464..2b6c81c7 100644 --- a/lib/jasmine-core/jasmine.css +++ b/lib/jasmine-core/jasmine.css @@ -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 { border: 1px solid #ddd; +} +.jasmine_html-reporter .jasmine-debug-log .jasmine-debug-log-msg { + white-space: pre; } \ No newline at end of file diff --git a/spec/core/ExceptionFormatterSpec.js b/spec/core/ExceptionFormatterSpec.js index 54deab8f..51a4c61b 100644 --- a/spec/core/ExceptionFormatterSpec.js +++ b/spec/core/ExceptionFormatterSpec.js @@ -159,6 +159,8 @@ describe('ExceptionFormatter', function() { jasmineFile: jasmine.util.jasmineFile() }); const result = subject.stack(error); + jasmine.debugLog('Original stack trace: ' + error.stack); + jasmine.debugLog('Filtered stack trace: ' + result); const lines = result.split('\n'); if (lines[0].match(/an error/)) { diff --git a/src/html/HtmlReporter.js b/src/html/HtmlReporter.js index bd3cd846..43053fbd 100644 --- a/src/html/HtmlReporter.js +++ b/src/html/HtmlReporter.js @@ -430,7 +430,11 @@ jasmineRequire.HtmlReporter = function(j$) { 'tr', {}, createDom('td', {}, entry.timestamp.toString()), - createDom('td', {}, entry.message) + createDom( + 'td', + { className: 'jasmine-debug-log-msg' }, + entry.message + ) ) ); }); diff --git a/src/html/_HTMLReporter.scss b/src/html/_HTMLReporter.scss index 7fb712f7..836ffb5f 100644 --- a/src/html/_HTMLReporter.scss +++ b/src/html/_HTMLReporter.scss @@ -424,5 +424,9 @@ body { table, th, td { border: 1px solid #ddd; } + + .jasmine-debug-log-msg { + white-space: pre; + } } }