我需要一些帮助,而且我对Jest很新。这是片段,我传递Json作为输入,你能帮忙写一下Jest测试用例来测试Call ID / SectionId是一个数字,SectionName是一个字符串,输入也是一个Json。
class sections {
constructor() {
}
public getSections(section): void {
for (let k = 0; k<section.length; k++){
console.log('CallId: '+section[k].CallId+', SectionId:
'+section[k].SectionId+', SectionName: '+section[k].SectionName);
}
}
}
export default new sections();