From 28a1f022233585cf40ae727d7d8334665a495e61 Mon Sep 17 00:00:00 2001 From: John Resig Date: Tue, 20 Jan 2009 16:00:48 +0000 Subject: Re-worked the logic for where .selector and .context are added for ID selectors (especially ones that aren't found). Fixes jQuery bug #3833. --- test/unit/core.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/unit/core.js b/test/unit/core.js index c8c7cad7a..aec334e52 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -53,7 +53,7 @@ test("jQuery()", function() { }); test("selector state", function() { - expect(28); + expect(30); var test; @@ -72,6 +72,10 @@ test("selector state", function() { test = jQuery("#main"); equals( test.selector, "#main", "#main Selector" ); equals( test.context, document, "#main Context" ); + + test = jQuery("#notfoundnono"); + equals( test.selector, "#notfoundnono", "#notfoundnono Selector" ); + equals( test.context, document, "#notfoundnono Context" ); test = jQuery("#main", document); equals( test.selector, "#main", "#main Selector" ); -- cgit v1.2.3