import { zip } from "../../utility/array/zip";
describe('Method zip tests...', () => {
test('zip should return the zipped array correctly when receive an array composed of number', () => {
const result = zip<number>(...received);
expect(result.length).toBe(expected.length);
result.forEach((outerV, outerI) => {
outerV.forEach((innerV, innerI) => {
expect(innerV).toBe(expected[outerI][innerI]);
test('zip should return the zipped array correctly when receive an mixed array', () => {
const func1 = function () { };
[998, false, arr1, func1],
const result = zip<any>(...received);
expect(result.length).toBe(expected.length);
result.forEach((outerV, outerI) => {
outerV.forEach((innerV, innerI) => {
expect(innerV).toBe(expected[outerI][innerI]);