it('should returns the lowest string from an array (array of strings)', () => { expect(arrayMin(['b', 'a', 'A', 'z', '1'])).toBe('1'); expect(arrayMin(['b', 'a', 'A', 'z'])).toBe('A'); expect(arrayMin(['b', 'a', 'z'])).toBe('a'); });
it('should returns the lowest number from an array (array of numbers)', () => { expect(arrayMin([])).toBeUndefined(); expect(arrayMin([0])).toBe(0); expect(arrayMin([0, 0, 0, -1, 3, 2])).toBe(-1); });