commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / bower_components / qunit / addons / step / qunit-step.js
1 QUnit.extend( QUnit, {
2
3 /**
4 * Check the sequence/order
5 *
6 * @example step(1); setTimeout(function () { step(3); }, 100); step(2);
7 * @param Number expected The excepted step within the test()
8 * @param String message (optional)
9 */
10 step: function (expected, message) {
11 this.config.current.step++; // increment internal step counter.
12 if (typeof message === "undefined") {
13 message = "step " + expected;
14 }
15 var actual = this.config.current.step;
16 QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
17 }
18 });
19
20 /**
21 * Reset the step counter for every test()
22 */
23 QUnit.testStart(function () {
24 this.config.current.step = 0;
25 });