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