import { humpToLine } from './humpToLine'; const string1 = 'goodsDetailNumber'; const string2 = 'selfName'; describe('humpToLine 驼峰转换下划线', () => { it('测试1 驼峰转换下划线, goodsDetailNumber', () => { expect(humpToLine(string1)).toBe('goods_detail_number'); }); it('测试2 驼峰转换下划线, selfName', () => { expect(humpToLine(string2)).toBe('self_name'); }); });