qunit-assert-step

1.1.1 • Public • Published

Build Status NPM version

QUnit Step assertion plugin

This plugin for QUnit adds a step assertion method to test the proper sequence in which the code should execute.

Usage

assert.step(expected, message);

Where:

  • expected: The expected step number (assertion sequence index)
  • message: Optional message, same as for other assertions

Examples

QUnit.test("example test", function(assert) {
  function x() {
    assert.step(2, "function y should be called first");
  }
  function y() {
    assert.step(1);
  }
  y();
  x();
});

For more examples, refer to the unit tests.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    7
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.1
    7
  • 1.1.0
    2
  • 1.0.3
    208
  • 1.0.2
    1
  • 1.0.1
    2

Package Sidebar

Install

npm i qunit-assert-step

Weekly Downloads

154

Version

1.1.1

License

MIT

Last publish

Collaborators

  • jamesmgreene