QUnit.skip()


QUnit.skip( name )

Description: Adds a test like object to be skipped

Use this method to replace QUnit.test() instead of commenting out entire tests.

This test's prototype will be listed on the suite as a skipped test, ignoring the callback argument and the respective global and module's hooks.

Example:

How to use skip as a placeholder for future or temporarily broken tests.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
QUnit.module( "robot", {
beforeEach: function() {
this.robot = new Robot();
}
});
QUnit.test( "say", function( assert ) {
assert.strictEqual( this.robot.say(), "Exterminate!" );
});
// Robot doesn't have a laser method, yet, skip this test
// Will show up as skipped in the results
QUnit.skip( "laser", function( assert ) {
assert.ok( this.robot.laser() );
});