我有一些代码,它使用HttpWebRequest类的.BeginGetResponse()方法,并且是异步的。另外,我正在使用微软的Unit Test App项目来测试应用程序。问题是测试框架不会等待异步代码运行结束,所以我不能检查它的结果。
如何使用Unit test App项目测试异步代码?我没有使用异步/等待修改器。
server.jsconst express = require("express");constroutes/auth"));
console.log("Server is running on Port " + port);user.jsbcrypt.compareSync(password, thi