HTML and CSS Reference
In-Depth Information
We now create a testing environment by creating a tests.html page within the
tests folder, and have the following code:
<!DOCTYPE html>
<meta charset="utf-8">
<title>Tests for Sun n' Sand Festival
<link rel="stylesheet" href="qunit-1.9.0.css">
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="//
<script>window.jQuery ||
document.write('<script src="js/vendor/
<script src="qunit-1.9.0.js"></script>
<script src="../js/main.js"></script>
<script src="test.js"></script>
In this code, we have included our main.js , file that we are using on our website.
We will be testing the code we wrote for the tabs used to display the line up.
Now, we will create the test.js file, where we will write all our tests for our code.
As our test depends on the markup that is used for the tabs, let us copy the markup
without the content from index.html to tests.html .
If we execute this test as it is, we will get an error claiming global failure. If you open
up the console of your browser's developer tools, you should see the following error:
Search WWH ::

Custom Search