我正在使用strong-soap
模塊從SOAP請求中獲取數據。如何在節點JS中用sinon存根SOAP客戶端請求?
var soap = require('strong-soap').soap;
soap.createClient(url, options, function (err, client) {
var method = client.GetInfoSOAP;
method(requestQuery, function (err, info) {
// bla bla
}
}
我正在獲取所需數據。現在 我想編寫單元測試用例來模擬使用sinon
存根的SOAP請求,但沒有得到任何成功。任何幫助,將不勝感激。
我的回答有幫助嗎? – oligofren