Commit cf8c957e cf8c957e9e3ddc2bb8044d8d1e85b233c54e9ad7 by Julien Muetton

skipping steps should not mess with assertion number

THis was a mistake as `assertion` is clearly different from `steps`.
`test.skip` does skip steps.
1 parent 4db25b20
......@@ -241,7 +241,6 @@ Tester.prototype.skip = function skip(nb, message) {
last = steps.length;
this.casper.step = Math.min(step + nb, last);
this.executed += this.casper.step - step;
return this.processAssertionResult({
success: null,
......
/*global casper*/
/*jshint strict:false*/
casper.test.begin('Skip tests', 2, function(test) {
casper.test.begin('Skip tests', 1, function(test) {
casper.start('tests/site/index.html');
casper.
......@@ -19,7 +19,7 @@ casper.test.begin('Skip tests', 2, function(test) {
});
});
casper.test.begin('Skip multiple', 3, function(test) {
casper.test.begin('Skip multiple', 1, function(test) {
casper.
then(function () {
test.skip(2);
......@@ -61,7 +61,7 @@ casper.test.begin('Skip does not polluate next suite', 1, function(test) {
});
});
casper.test.begin('Casper.thenSkip', 2, function(test) {
casper.test.begin('Casper.thenSkip', 1, function(test) {
casper.
thenSkip(1).
then(function () {
......@@ -76,7 +76,7 @@ casper.test.begin('Casper.thenSkip', 2, function(test) {
});
});
casper.test.begin('Casper.thenSkipIf', 5, function(test) {
casper.test.begin('Casper.thenSkipIf', 3, function(test) {
casper.
thenSkipIf(true, 1, "Skip if with function").
then(function () {
......@@ -106,7 +106,7 @@ casper.test.begin('Casper.thenSkipIf', 5, function(test) {
});
});
casper.test.begin('Casper.thenSkipUnless', 5, function(test) {
casper.test.begin('Casper.thenSkipUnless', 3, function(test) {
casper.
thenSkipUnless(false, 1, "Skip unless with function").
then(function () {
......