-
Notifications
You must be signed in to change notification settings - Fork 775
Pendings tests #787
Copy link
Copy link
Closed
Labels
Category: APIComponent: HTML ReporterStatus: ReadyA "Meta" type issue that has reached consensus.A "Meta" type issue that has reached consensus.Type: EnhancementNew idea or feature request.New idea or feature request.
Description
Something that came out of a discussion with Yehuda: During a big refactoring they have hundreds of failing tests. They turned them off using QUnit.skip, but that doesn't tell them which of the skipped tests starting passing again at some point. To quickly test changes in passing tests, they ended up with this:
QUnit.skip = QUnit.test;There's probably a better way to deal with that situation. One idea is to have something like a QUnit.pending method, that has the same signature as QUnit.test(), but will reverse the result. So if all assertions pass, the test fails, if at least one fails, the test passes.
The HTML reporter could use a similar marker as QUnit.skip.
Thoughts?
Update 2015-04-15:
After some discussion, we came up with this:
// This test will show up with a "todo" badge, with a similar style as the "skipped" badge
// It will show as passed when at least one assertion fails, or fail when all assertions pass
QUnit.todo( "this isn't implemented, yet" function( assert ) {
assert.ok( featureTest(), "waiting for feature" );
} );
QUnit.testDone( function( details ) {
console.log( details.name, details.todo );
//> "this isn't implemented, yet" true
} );
QUnit.log( function( details ) {
console.log( details.message, details.todo );
//> "waiting for feature" true
} );Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Category: APIComponent: HTML ReporterStatus: ReadyA "Meta" type issue that has reached consensus.A "Meta" type issue that has reached consensus.Type: EnhancementNew idea or feature request.New idea or feature request.