Skip to content

Commit

Permalink
Fix preserve typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mattphillips committed Feb 4, 2018
1 parent 3598651 commit a43fc06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/preseveArray.test.js → src/preserveArray.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import preseveArray from './preseveArray';
import preserveArray from './preserveArray';

describe('.preseveArray', () => {
describe('.preserveArray', () => {
test('returns diff with nested objects converted back to arrays when property is deleted', () => {
const left = { a: [{ b: ['#', '#', '#', { hello: '' }] }, '#', { c: '', d: ['#', ''] }, '#'] };
const right = { a: [{ b: ['#', '#', '#', { hello: 'world' }] }, '#', { c: 'hello', d: ['#', 'bob'] }] };
Expand Down Expand Up @@ -48,7 +48,7 @@ describe('.preseveArray', () => {
delete expected.a[1];
delete expected.a[2].d[0];

expect(preseveArray(diff, left, right)).toEqual(expected);
expect(preserveArray(diff, left, right)).toEqual(expected);
});

test('returns diff with nested objects converted back to arrays when new property is added', () => {
Expand Down Expand Up @@ -98,6 +98,6 @@ describe('.preseveArray', () => {
delete expected.a[1];
delete expected.a[2].d[0];

expect(preseveArray(diff, left, right)).toEqual(expected);
expect(preserveArray(diff, left, right)).toEqual(expected);
});
});

0 comments on commit a43fc06

Please sign in to comment.