4 * Check the sequence/order
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)
10 step: function (expected
, message
) {
11 this.config
.current
.step
++; // increment internal step counter.
12 if (typeof message
=== "undefined") {
13 message
= "step " + expected
;
15 var actual
= this.config
.current
.step
;
16 QUnit
.push(QUnit
.equiv(actual
, expected
), actual
, expected
, message
);
21 * Reset the step counter for every test()
23 QUnit
.testStart(function () {
24 this.config
.current
.step
= 0;