import { round } from './round'; describe('获取随机数 round 方法单元测试', () => { it('测试1 无参数', () => { const val = round(8); expect(val >= 0 && val < 8).toBe(true); }); it('测试2 value = null', () => { const val = round(8, 5); expect(val >= 5 && val < 8).toBe(true); }); });