Skip to content

Commit

Permalink
add htc path for older IE and be sure to expire the live queries in t…
Browse files Browse the repository at this point in the history
…he tests
  • Loading branch information
brandonaaron committed Dec 18, 2013
1 parent 63d0476 commit 96d2506
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/unit/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
document.title = document.title + ' against jQuery' + jQuery.fn.jquery;
</script>
<script src="../../jquery.livequery.js"></script>
<script>
$.livequery.htcPath = '../../jquery.livequery.htc';
</script>
<script src="tests.js"></script>
</body>
</html>
4 changes: 3 additions & 1 deletion test/unit/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ test("Fires for existing matched elements", 4, function() {
ok( $(elem).is('li'), 'It is an li element' );
ok( $(elem).closest('.container').length === 1, 'It does belong to the .container div' );
if (--count === 0) {
this.$target.expire('li');
start();
}
}, this));
Expand All @@ -25,6 +26,7 @@ test("Fires for newly added matched elements (via jQuery)", 1, function() {
this.$target.livequery('li', $.proxy(function(elem) {
if (elem.id === "newli") {
ok( $(elem).is('li'), 'It is an li element' );
this.$target.expire('li');
start();
}
}, this));
Expand All @@ -37,7 +39,7 @@ test("Scope and first argument are the element", 2, function() {
this.$target.livequery('li', function(elem) {
ok($(this).is('li'), 'Scope is the matched li element');
equal(this, elem, 'Scope and element are the same');
start();
_this.$target.expire('li');
start();
})
});

0 comments on commit 96d2506

Please sign in to comment.