summaryrefslogtreecommitdiffstats
path: root/spec/utils.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-08-14 12:25:35 -0500
committerkpdecker <kpdecker@gmail.com>2014-08-14 12:25:35 -0500
commitcb22ee5681b1eb1f89ee675651c018b77dd1524d (patch)
tree6e0090585ce47b53fad8a3428179a02a721eda66 /spec/utils.js
parent9ab31e1fc6c94e5c13f9e6a10e23b1c1ed79c504 (diff)
downloadhandlebars.js-cb22ee5681b1eb1f89ee675651c018b77dd1524d.zip
handlebars.js-cb22ee5681b1eb1f89ee675651c018b77dd1524d.tar.gz
handlebars.js-cb22ee5681b1eb1f89ee675651c018b77dd1524d.tar.bz2
Increase test coverage a touch
Diffstat (limited to 'spec/utils.js')
-rw-r--r--spec/utils.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/utils.js b/spec/utils.js
index 390ad05..ea7d782 100644
--- a/spec/utils.js
+++ b/spec/utils.js
@@ -56,4 +56,20 @@ describe('utils', function() {
equals(Handlebars.Utils.isEmpty({bar: 1}), false);
});
});
+
+ describe('#extend', function() {
+ it('should ignore prototype values', function() {
+ function A() {
+ this.a = 1;
+ }
+ A.prototype.b = 4;
+
+ var b = {b: 2};
+
+ Handlebars.Utils.extend(b, new A());
+
+ equals(b.a, 1);
+ equals(b.b, 2);
+ });
+ });
});