import { isUndefined } from './index'; describe('测试 types 模块 isUndefined 方法', () => { it('Number类型', () => { expect(isUndefined(111)).toBe(false); }); it('String类型', () => { expect(isUndefined('11111')).toBe(false); }); it('Array类型', () => { expect(isUndefined(['11111', '22222'])).toBe(false); }); it('Object类型', () => { expect(isUndefined({ name: 'xxx' })).toBe(false); }); it('undefined', () => { expect(isUndefined(undefined)).toBe(true); }); it('Null', () => { expect(isUndefined(null)).toBe(false); }); });