Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 61 lines (54 sloc) 1.361 kb
dbbbe5d Paul Irish including qunit test suite, w/ empty tests for the moment.
paulirish authored
1 <!doctype html>
2 <html>
3 <head>
4 <link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.5.0.css" type="text/css"/>
5 <style>
6 h1 label {display: none!important}
7 </style>
8 <script type="text/javascript" src="http://code.jquery.com/qunit/qunit-1.5.0.js"></script>
9 <script src="qunit-yeti-adaptor.js"></script>
10 <script type="text/javascript">
11 module("module1", {
12 setup: function() {
13 this.foobar = true;
14 }
15 });
16
17 test("first test with setup", function() {
18 ok(this.foobar, "this.foobar is defined");
19 });
20
21 module("module2", {
22 setup: function() {
23 this.foobar = "setup";
24 },
25 teardown: function() {
26 this.foobar = "teardown";
27 }
28 });
29
30 test("test with setup and teardown", function() {
31 expect(2);
32 ok(this.foobar);
33 equal(this.foobar, "setup");
34 });
35
36 asyncTest("asynchronous test", function() {
37 var that = this;
38 setTimeout(function() {
39 start();
40 // Start have to be called in async function
41 // No matter where
42 equal(that.foobar, "setup");
43 }, 3000);
44 });
45
46 module("module3");
47
48 test("test with neither setup nor teardown", function() {
49 equal(typeof this.foobar, "undefined");
50 // this object is cleaned up each test
51 });
52 </script>
53 </head>
54 <body>
55 <h1 id="qunit-header">HTML5 Please test suite</h1>
56 <h2 id="qunit-banner"></h2>
57 <h2 id="qunit-userAgent"></h2>
58 <ol id="qunit-tests"></ol>
59 </body>
60 </html>
Something went wrong with that request. Please try again.