import { isArray } from './index'; describe('测试 types 模块 isArray 方法', () => { it('Number类型', () => { expect(isArray(1111)).toBe(false); }); it('String类型', () => { expect(isArray('[1,2,3]')).toBe(false); }); it('Object类型', () => { expect(isArray({ name: 'xxxx' })).toBe(false); }); it('Array类型', () => { expect(isArray([1, 2, 3])).toBe(true); }); });