Skip to content

Commit

Permalink
Reporter: Logs skipped tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leobalter committed Sep 4, 2014
1 parent 73712a9 commit 4ff6765
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions reporter/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,9 @@ QUnit.testDone(function( details ) {
time.innerHTML = details.runtime + " ms";

testItem.className = bad ? "fail" : "pass";
if ( details.skipped ) {
addClass( testItem, "skipped" );
}

testItem.insertBefore( time, assertList );
});
Expand Down
5 changes: 5 additions & 0 deletions src/qunit.css
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@

#qunit-banner.qunit-fail { background-color: #EE5757; }

/*** Skipped tests */

#qunit-tests .skipped {
background-color: #EBECE9;
}

/** Result */

Expand Down
1 change: 1 addition & 0 deletions src/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ Test.prototype = {
runLoggingCallbacks( "testDone", {
name: this.testName,
module: this.module,
skipped: !!this.skip,
failed: bad,
passed: this.assertions.length - bad,
total: this.assertions.length,
Expand Down
3 changes: 2 additions & 1 deletion test/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ QUnit.test( "test2", function( assert ) {
failed: 0,
passed: 17,
total: 17,
testNumber: 1
testNumber: 1,
skipped: false
}, "testDone context" );
assert.deepEqual( testContext, {
module: "logs1",
Expand Down

0 comments on commit 4ff6765

Please sign in to comment.