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 shift nested array', () => {
const res = arrayUnshift('medium.0.nest', 2)(fields);
expect(res['medium.0.nest.2']).toBeUndefined();
expect(res['medium.0.nest.0']).toBe(field0);
expect(res['medium.0.nest.1']).toBe(field1);
expect(res['medium.0.nest.3']).toBe(field2);
expect(res['medium.0.nest.4']).toBe(field3);
});