diff options
Diffstat (limited to 'spec/utils.js')
-rw-r--r-- | spec/utils.js | 16 |
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); + }); + }); }); |