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:
c2bbcd8
)
Added a method to myKlass.
author
rkatic
<robert.katic@gmail.com>
Mon, 9 Nov 2009 10:55:25 +0000
(18:55 +0800)
committer
John Resig
<jeresig@gmail.com>
Mon, 9 Nov 2009 11:32:24 +0000
(19:32 +0800)
If an object's prototype is "empty", then isObject returns true!
test/unit/core.js
patch
|
blob
|
history
diff --git
a/test/unit/core.js
b/test/unit/core.js
index
25ff1f5
..
4b1da51
100644
(file)
--- a/
test/unit/core.js
+++ b/
test/unit/core.js
@@
-550,6
+550,8
@@
test("jQuery.extend(Object, Object)", function() {
same( empty.foo, optionsWithDate.foo, "Dates copy correctly" );
var myKlass = function() {};
+ // Makes the class a little more realistic
+ myKlass.prototype = { someMethod: function(){} };
empty = {};
var optionsWithCustomObject = { foo: { date: new myKlass } };
jQuery.extend(true, empty, optionsWithCustomObject);