git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
694b625
)
Added some tests for #5991.
author
Robert Katic
<robert.katic@gmail.com>
Thu, 4 Feb 2010 21:54:53 +0000
(22:54 +0100)
committer
jeresig
<jeresig@gmail.com>
Thu, 23 Sep 2010 16:07:22 +0000
(12:07 -0400)
test/unit/core.js
patch
|
blob
|
history
diff --git
a/test/unit/core.js
b/test/unit/core.js
index
81bca10
..
d83f667
100644
(file)
--- a/
test/unit/core.js
+++ b/
test/unit/core.js
@@
-661,7
+661,7
@@
test("jQuery.merge()", function() {
});
test("jQuery.extend(Object, Object)", function() {
});
test("jQuery.extend(Object, Object)", function() {
- expect(26);
+ expect(28);
var settings = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" },
options = { xnumber2: 1, xstring2: "x", xxx: "newstring" },
var settings = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" },
options = { xnumber2: 1, xstring2: "x", xxx: "newstring" },
@@
-689,6
+689,10
@@
test("jQuery.extend(Object, Object)", function() {
equals( deep1.foo2, document, "Make sure that a deep clone was not attempted on the document" );
ok( jQuery.extend(true, {}, nestedarray).arr !== arr, "Deep extend of object must clone child array" );
equals( deep1.foo2, document, "Make sure that a deep clone was not attempted on the document" );
ok( jQuery.extend(true, {}, nestedarray).arr !== arr, "Deep extend of object must clone child array" );
+
+ // #5991
+ ok( jQuery.isArray( jQuery.extend(true, { arr: {} }, nestedarray).arr ), "Cloned array heve to be an Array" );
+ ok( jQuery.isPlainObject( jQuery.extend(true, { arr: arr }, { arr: {} }).arr ), "Cloned object heve to be an plain object" );
var empty = {};
var optionsWithLength = { foo: { length: -1 } };
var empty = {};
var optionsWithLength = { foo: { length: -1 } };