diff options
author | Anton M <obhvsbypqghgc@gmail.com> | 2011-02-15 21:01:52 +0100 |
---|---|---|
committer | Anton M <obhvsbypqghgc@gmail.com> | 2011-02-15 21:03:34 +0100 |
commit | 8e40a84c24271c0a9253902ceb97185f243a3318 (patch) | |
tree | a2ec5520b1a05d929e7da02e250eb95419dc9ecf /test | |
parent | 2cc03a86fc046e81013d32a662f4043f1c10b436 (diff) | |
download | jquery-8e40a84c24271c0a9253902ceb97185f243a3318.tar.gz jquery-8e40a84c24271c0a9253902ceb97185f243a3318.zip |
Fix some unscoped tests which failed after recent changes to QUnit.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/core.js | 10 | ||||
-rw-r--r-- | test/unit/event.js | 2 | ||||
-rw-r--r-- | test/unit/traversing.js | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/test/unit/core.js b/test/unit/core.js index a7b3b48d2..16700e4d7 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -537,29 +537,29 @@ test("end()", function() { test("length", function() { expect(1); - equals( jQuery("p").length, 6, "Get Number of Elements Found" ); + equals( jQuery("#main p").length, 6, "Get Number of Elements Found" ); }); test("size()", function() { expect(1); - equals( jQuery("p").size(), 6, "Get Number of Elements Found" ); + equals( jQuery("#main p").size(), 6, "Get Number of Elements Found" ); }); test("get()", function() { expect(1); - same( jQuery("p").get(), q("firstp","ap","sndp","en","sap","first"), "Get All Elements" ); + same( jQuery("#main p").get(), q("firstp","ap","sndp","en","sap","first"), "Get All Elements" ); }); test("toArray()", function() { expect(1); - same( jQuery("p").toArray(), + same( jQuery("#main p").toArray(), q("firstp","ap","sndp","en","sap","first"), "Convert jQuery object to an Array" ); }); test("get(Number)", function() { expect(2); - equals( jQuery("p").get(0), document.getElementById("firstp"), "Get A Single Element" ); + equals( jQuery("#main p").get(0), document.getElementById("firstp"), "Get A Single Element" ); strictEqual( jQuery("#firstp").get(1), undefined, "Try get with index larger elements count" ); }); diff --git a/test/unit/event.js b/test/unit/event.js index 1d9e2e110..8d69807e5 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -409,7 +409,7 @@ test("bind(), namespaced events, cloned events", 18, function() { }).trigger("tester"); // Make sure events stick with appendTo'd elements (which are cloned) #2027 - jQuery("<a href='#fail' class='test'>test</a>").click(function(){ return false; }).appendTo("p"); + jQuery("<a href='#fail' class='test'>test</a>").click(function(){ return false; }).appendTo("#main"); ok( jQuery("a.test:first").triggerHandler("click") === false, "Handler is bound to appendTo'd elements" ); }); diff --git a/test/unit/traversing.js b/test/unit/traversing.js index 56fed2200..f5108bdef 100644 --- a/test/unit/traversing.js +++ b/test/unit/traversing.js @@ -97,9 +97,9 @@ test("filter(Selector)", function() { test("filter(Function)", function() { expect(2); - same( jQuery("p").filter(function() { return !jQuery("a", this).length }).get(), q("sndp", "first"), "filter(Function)" ); + same( jQuery("#main p").filter(function() { return !jQuery("a", this).length }).get(), q("sndp", "first"), "filter(Function)" ); - same( jQuery("p").filter(function(i, elem) { return !jQuery("a", elem).length }).get(), q("sndp", "first"), "filter(Function) using arg" ); + same( jQuery("#main p").filter(function(i, elem) { return !jQuery("a", elem).length }).get(), q("sndp", "first"), "filter(Function) using arg" ); }); test("filter(Element)", function() { @@ -178,7 +178,7 @@ test("not(Element)", function() { }); test("not(Function)", function() { - same( jQuery("p").not(function() { return jQuery("a", this).length }).get(), q("sndp", "first"), "not(Function)" ); + same( jQuery("#main p").not(function() { return jQuery("a", this).length }).get(), q("sndp", "first"), "not(Function)" ); }); test("not(Array)", function() { |