import { divideArray } from '../divideArray';

describe('divideArray', () => {
  it('should divide an array into 3 rows', () => {
    const array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
    const rows = divideArray(array, 3);
    expect(rows).toEqual([
      [1, 4, 7, 10],
      [2, 5, 8],
      [3, 6, 9],
    ]);
  });
});
