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