spec/js/extend.spec.js in i18n-js-3.0.2 vs spec/js/extend.spec.js in i18n-js-3.0.3
- old
+ new
@@ -80,6 +80,29 @@
}
}
expect(I18n.extend(obj1, obj2)).toEqual(expected);
});
+
+ it("should merge array values", function() {
+ var obj1 = {
+ array1: [1, 2]
+ },
+ obj2 = {
+ array2: [1, 2],
+ obj3: {
+ array3: [1, 2],
+ array4: [{obj4: 1}, 2]
+ }
+ },
+ expected = {
+ array1: [1, 2],
+ array2: [1, 2],
+ obj3: {
+ array3: [1, 2],
+ array4: [{obj4: 1}, 2]
+ }
+ }
+
+ expect(JSON.stringify(I18n.extend(obj1, obj2))).toEqual(JSON.stringify(expected));
+ });
});