我一直在为交换案例编写测试用例,有2个测试用例。我收到此皮棉错误,提示Update or refactor this function so that its implementation does not duplicate other
。由于切换案例包含相似的案例,因此我需要帮助来重新编写我的代码。
这是我的2例
it('case 1',() => {
data = merge(Run.String_Window,{
0: '3',});
expect(service.getName('year-1',element,frequency)).toEqual(serve);
});
it('case 2',{
0: '5',});
expect(service.getName('year-2',frequency)).toEqual(serve);
});