我使用testdouble在我的node.js項目中存根呼叫。這個特定的功能包裝了一個承諾,並且在該函數本身內有多個調用then。 function getUser (rethink, username) {
return new Promise((resolve, reject) => {
let r = database.connect();
r.then(con
前提: JS ES6,的NodeJS 測試框架:TAP 嘲諷庫:testdouble.js 我試圖嘲弄的返回值的方法我的班級,並不斷收到此錯誤: not ok Unsatisfied verification on test double. Wanted: - called with (true) . But there were no invocations of the test double