如何在承诺中获得价值

时间:2020-09-14 10:00:55

标签: javascript selenium

告诉我如何在描述func中使用dataTest:(

xlsxFile('./src/scenario/Khanh.xlsx').then((rows) => {
    const dataTest = rows[0][1];
   })  

describe("EZT Admin Login", async () => {
    // console.log('obj', Array.from(obj))

  it("should read excel file  ", async () => {
    
  });
});

1 个答案:

答案 0 :(得分:0)

有几种方法可以实现,其中一种是将文件的读取包含在一个返回预期结果的函数中,然后在您的describe内调用它。