merged some tests

This commit is contained in:
Jeremy Ashkenas
2009-10-26 08:43:10 -04:00
parent 5c46c60b06
commit cf61edffa8
3 changed files with 12 additions and 13 deletions

View File

@@ -20,8 +20,10 @@ $(document).ready(function() {
var moe = {name : 'moe', lucky : [13, 27, 34]};
var clone = _.clone(moe);
equals(clone.name, 'moe', 'the clone as the attributes of the original');
clone.name = 'curly';
ok(clone.name == 'curly' && moe.name == 'moe', 'clones can change shallow attributes without affecting the original');
clone.lucky.push(101);
equals(_.last(moe.lucky), 101, 'changes to deep attributes are shared with the original');
});