Skip to content
This repository was archived by the owner on Jun 3, 2018. It is now read-only.

Commit 2b8e52a

Browse files
author
Thomas Kemmer
committed
fixed tests for jQuery >= 1.7: Deferred.then() returns promise
1 parent 6dd742b commit 2b8e52a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<title>QUnit Test Page for jquery.timeout</title>
66
<link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />
7-
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script>
7+
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
88
<script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>
99
<script type="text/javascript" src="jquery.timeout.js"></script>
1010
</head>
@@ -36,7 +36,8 @@ <h2 id="qunit-userAgent"></h2>
3636
});
3737

3838
asyncTest("clear timeout", 1, function() {
39-
var t = $.timeout(86400000).then(function() {
39+
var t = $.timeout(86400000);
40+
t.then(function() {
4041
ok(false);
4142
start();
4243
}, function() {
@@ -61,13 +62,13 @@ <h2 id="qunit-userAgent"></h2>
6162
});
6263

6364
asyncTest("additional reject args", 3, function() {
64-
var t = $.timeout(86400000).fail(function(a, b) {
65+
var t = $.timeout(86400000);
66+
t.fail(function(a, b) {
6567
equal(arguments.length, 2);
6668
equal(a, "abc");
6769
equal(b, 42);
6870
start();
6971
});
70-
7172
t.clear("abc", 42);
7273
});
7374
</script>

0 commit comments

Comments
 (0)