Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook

(Nora) #1

124 CHAPTER 3 Getting started with JavaScript


<title></title>
<link rel="stylesheet" type="text/css" href="Content/qunit.css" />
<script type="text/javascript" src="Scripts/qunit.js"></script>
<script type="text/javascript" src="Scripts/CalculatorLibrary.js"></script>
<script type="text/javascript" src="Scripts/tests.js"></script>
</head>
<body>
<h1 id="qunit-header">QUnit example</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">
test markup, will be hidden
</div>
</body>
</html>


  1. Notice that the
    element for the QUint fixture is a placeholder for HTML markup
    that you want to access in your tests, where this markup should not render. Copy the
    HTML markup that is in the default.html file and paste it in the QUnit fixture.
    Your HTML source should now look like the following:
    <!DOCTYPE html>








    QUnit example







      test markup, will be hidden



















    Free download pdf