Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should add the child after the prevKey', () => {
expect(onChildAdded([val1, val2], val3, toKey, 'key1')).toEqual([val1, val3, val2]);
});
it('should not mutate the input array', () => {
let inputArr = [val1];
expect(onChildAdded(inputArr, val2, toKey, 'key1')).not.toEqual(inputArr);
});
});