diff options
author | John Resig <jeresig@gmail.com> | 2009-01-20 16:00:48 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-01-20 16:00:48 +0000 |
commit | 28a1f022233585cf40ae727d7d8334665a495e61 (patch) | |
tree | 16068cbfeb4900ed13f8b746edba60a82d3abcd5 /test | |
parent | 7647cebc3929337d1e77069c8620158dcf84ff20 (diff) | |
download | jquery-28a1f022233585cf40ae727d7d8334665a495e61.tar.gz jquery-28a1f022233585cf40ae727d7d8334665a495e61.zip |
Re-worked the logic for where .selector and .context are added for ID selectors (especially ones that aren't found). Fixes jQuery bug #3833.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/core.js | 6 |
1 files changed, 5 insertions, 1 deletions
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" ); |