|
1 |
| -import preseveArray from './preseveArray'; |
| 1 | +import preserveArray from './preserveArray'; |
2 | 2 |
|
3 |
| -describe('.preseveArray', () => { |
| 3 | +describe('.preserveArray', () => { |
4 | 4 | test('returns diff with nested objects converted back to arrays when property is deleted', () => {
|
5 | 5 | const left = { a: [{ b: ['#', '#', '#', { hello: '' }] }, '#', { c: '', d: ['#', ''] }, '#'] };
|
6 | 6 | const right = { a: [{ b: ['#', '#', '#', { hello: 'world' }] }, '#', { c: 'hello', d: ['#', 'bob'] }] };
|
@@ -48,7 +48,7 @@ describe('.preseveArray', () => {
|
48 | 48 | delete expected.a[1];
|
49 | 49 | delete expected.a[2].d[0];
|
50 | 50 |
|
51 |
| - expect(preseveArray(diff, left, right)).toEqual(expected); |
| 51 | + expect(preserveArray(diff, left, right)).toEqual(expected); |
52 | 52 | });
|
53 | 53 |
|
54 | 54 | test('returns diff with nested objects converted back to arrays when new property is added', () => {
|
@@ -98,6 +98,6 @@ describe('.preseveArray', () => {
|
98 | 98 | delete expected.a[1];
|
99 | 99 | delete expected.a[2].d[0];
|
100 | 100 |
|
101 |
| - expect(preseveArray(diff, left, right)).toEqual(expected); |
| 101 | + expect(preserveArray(diff, left, right)).toEqual(expected); |
102 | 102 | });
|
103 | 103 | });
|
0 commit comments