Once we have the QUnit files in place, we can set up the test HTML document. In a typical project, this file would be named
index.html and placed in the same test subfolder as
qunit.css. For this demonstration, however, we will put it in a parent directory.
of the document contains a
<link> tag for the CSS file and
B.js) and the tests themselves (
<body> tag consists of six main elements, each with an ID that is used by QUnit for running and displaying the results of the tests. A file with similar markup in the downloaded QUnit's
test folder can be used as a template for getting started.
In order to demonstrate QUnit, ...