mardi 4 février 2020

Cucumberjs - calling async methods in step definitions

I am calling api of jira in step definitions but it not working. i am using npm package request to make request call. ex -

function getIssue(){

request({url:"....."},function(err,response,body){

console.log(body)

})

}

step_definition

when("......",async function(){
         await getIssue();
   })

I found it is not going even in request callback.

Aucun commentaire:

Enregistrer un commentaire