QUnit Expectations
by vijayram_a
HTML
<script src="http://code.jquery.com/qunit/qunit-1.12.0.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.12.0.css">
<h1 id="qunit-header">Test Suite</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture"></div>
JavaScript
// You can either set an expectation (number) like this.
test("test name inline", function() {
// QUnit expects 3 assertions in this test.
expect(3);
});
// Or like this.
test("test name implicit", 3, function() {
// QUnit expects 3 assertions in this test.
});