diff options
author | John Resig <jeresig@gmail.com> | 2009-01-08 21:41:58 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-01-08 21:41:58 +0000 |
commit | c6f189ac73939c813bf3a2b848c492c8ba259807 (patch) | |
tree | 0dbe84b27ecdbb09014a10e9589ba44990286ab2 /test | |
parent | 49d0d5b7a3628947a14028d14ed042746cc6c3e4 (diff) | |
download | jquery-c6f189ac73939c813bf3a2b848c492c8ba259807.tar.gz jquery-c6f189ac73939c813bf3a2b848c492c8ba259807.zip |
Selector state wasn't being passed along on a cloned jQuery object.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/core.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/unit/core.js b/test/unit/core.js index ee5f805ec..98a161fa8 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -53,7 +53,7 @@ test("jQuery()", function() { }); test("selector state", function() { - expect(26); + expect(28); var test; @@ -80,6 +80,11 @@ test("selector state", function() { test = jQuery("#main", document.body); equals( test.selector, "#main", "#main Selector" ); equals( test.context, document.body, "#main Context" ); + + // Test cloning + test = jQuery(test); + equals( test.selector, "#main", "#main Selector" ); + equals( test.context, document.body, "#main Context" ); test = jQuery(document.body).find("#main"); equals( test.selector, "#main", "#main find Selector" ); |