UNPKG

hel-tpl-remote-lib

Version:

基于[hel-micro](https://github.com/tnfe/hel)搭建的远程仓库模板库

20 lines (18 loc) 516 B
import { canBeNum } from '../num'; /** * @author fancyzhong * @priority P0 * @casetype unit */ describe('test num util', () => { test('canBeNum should works as expect', () => { expect(canBeNum(1)).toBeTruthy(); expect(canBeNum(1.0)).toBeTruthy(); expect(canBeNum('1')).toBeTruthy(); expect(canBeNum('1.')).toBeTruthy(); expect(canBeNum('1.0')).toBeTruthy(); expect(canBeNum('1.s')).toBeFalsy(); expect(canBeNum('1s')).toBeFalsy(); expect(canBeNum(null)).toBeFalsy(); }); });