In order to configure QUnit, the first step is to download the two framework files:
The QUnit JS file found at http://code.jquery.com/qunit/qunit-1.10.0.js
The QUnit CSS file found at http://code.jquery.com/qunit/qunit-1.10.0.css
After downloading the two files, put them in the same folder. (Let's call this folder lib
.) At the time of this writing, the latest release of QUnit is the v1.10.0, which will be used in this book.
Now, let's prepare the tests' runner page of the QUnit test runner page. The following code snippet shows the BasicRunner.html
page that contains the basic skeleton of the QUnit test runner page:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>QUnit test runner</title> <link rel="stylesheet" href="lib/qunit-1.10.0.css"> </head> <body> <div id="qunit"></div> <div id="qunit-fixture"></div> <script src="lib/qunit-1.10.0.js"></script> ...The test...