public requestMachineApplyCorrection = (id: string) => {
let correctionID: string = id;
fetch('/api/RequestMachineApplyCorrection', {
...defaultOptions,
method: "POST",
body: JSON.stringify({ correctionID: correctionID })
})
.then(data => {
this.getQueuedCorrectionObjects()
})
.catch(error => {
console.log(error)
});
}
我刚开始接触 typescript 来编写单元测试用例。如何为上述方法编写单元测试用例