[IMP] web: improve qunit logging and config
When a qunit test fails, the log only contains the assertion message. This is in fact useful to have the "actual" and "expected" values to understand the bug. Also, we recently updated the configuration so that the "hide passed tests" option is enabled by default. This is in fact useful to have it disabled if the user wants to run only one test (debugging).
This commit is contained in:
@@ -36,7 +36,7 @@ QUnit.config.testTimeout = 1 * 60 * 1000;
|
||||
/**
|
||||
* Hide passed tests by default in the QUnit page
|
||||
*/
|
||||
QUnit.config.hidepassed = true;
|
||||
QUnit.config.hidepassed = (window.location.href.match(/[?&]testId=/) === null);
|
||||
|
||||
var sortButtonAppended = false;
|
||||
|
||||
@@ -67,6 +67,8 @@ QUnit.log(function( result) {
|
||||
console.log('"' + result.name + '"',
|
||||
'in section', '"' + result.module + '"',
|
||||
'failed:', result.message);
|
||||
console.log('actual:', result.actual);
|
||||
console.log('expected:', result.expected);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user