Node.js 如何使用sinon.usefakxmlhttprequest&;NodeJS环境中的sinon.fakeServer.create

Node.js 如何使用sinon.usefakxmlhttprequest&;NodeJS环境中的sinon.fakeServer.create,node.js,sinon,Node.js,Sinon,在我的项目中,需要在NodeJS环境中执行测试脚本。在测试脚本中,我想使用sinon的useFakeXMLHttpRequest&fakeServer 是否可以在NodeJS环境中使用它 谢谢你的帮助

在我的项目中,需要在NodeJS环境中执行测试脚本。在测试脚本中,我想使用sinon的useFakeXMLHttpRequest&fakeServer

是否可以在NodeJS环境中使用它

谢谢你的帮助