import { isArray } from './is-array';

describe('Is Array', () => {
  it('should return true', () => {
    expect(isArray([])).toBeTruthy();
  });

  it('should return false when param is undefined', () => {
    expect(isArray(undefined)).toBeFalsy();
  });

  it('should return false when param is null', () => {
    expect(isArray(null)).toBeFalsy();
  });

  it('should return false when param is a string', () => {
    expect(isArray('test')).toBeFalsy();
  });

  it('should return false when param is a number', () => {
    expect(isArray(4561)).toBeFalsy();
  });

  it('should return false when param is an object', () => {
    expect(isArray({ unit: 'Test' })).toBeFalsy();
  });

  it('should return false when param is a function', () => {
    expect(
      isArray(function hello() {
        return 'world';
      })
    ).toBeFalsy();
  });
});
