Node.js 在mocha中,我很难用不同的参数异步调用多个API

Node.js 在mocha中,我很难用不同的参数异步调用多个API,node.js,mocha.js,sendasynchronousrequest,Node.js,Mocha.js,Sendasynchronousrequest,在每次迭代中,我必须使用不同的参数在循环中进行多个api调用 for (const patientId of patientIds) { console.log("PATIENT ID:" + patientId) describe('GET API', function () { it('Login Request', async function () { let respon

在每次迭代中,我必须使用不同的参数在循环中进行多个api调用

for (const patientId of patientIds)
    {
        console.log("PATIENT ID:" + patientId)

        describe('GET API', function () {
            it('Login Request', async function () {
               let response= await util.apiCall(patientId)
                     .then(function(response){
                       
                        console.log("Checking bad request:" + response.badRequest);
                        console.log("Checking status code:" + response.status)
              
                        
                        })
            })
假设: 第一个患者Id:1->apiCall(1) 第二个患者Id 2->apiCall(2) 但每次迭代都需要最后一次读取patientId来执行api调用,即始终执行apiCall(2)。我应该如何保持执行和输出的顺序