more unit tests

This commit is contained in:
Klemek
2019-07-15 11:03:05 +02:00
parent 83124b3da4
commit 7d97c95384
+4
View File
@@ -14,6 +14,10 @@ describe('merge', () => {
const res = utils.merge({'a': 'hello'}, {'a': 2});
expect(res).toEqual({'a': 'hello'});
});
test('wrong type array', () => {
const res = utils.merge({'a': [1, 2, 3]}, {'a': {b: 5}});
expect(res).toEqual({'a': [1, 2, 3]});
});
test('array redefine', () => {
const res = utils.merge({'a': [1, 2, 3]}, {'a': [4, 5, 6]});
expect(res).toEqual({'a': [4, 5, 6]});