我已经使用mocha和supertest为我的nodejs应用程序编写了测试用例。但是我的nodejs应用程序有一个开始开发环境和生产环境的参数,例如,npm start -- development,npm start -- production。但是从我的mocha & supertest应用程序中,我如何为两个不同的环境启动服务器。我给出如下
var server = supertest.agent("https://XXXXXX:3050")那么,我如何涵盖这两种环境的测试用例呢?
https://stackoverflow.com/questions/41420834
复制相似问题