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