question title how to test promise? with mocha chai and sinon problem description suppose you encapsulate a function that initiates an asynchronous request task, succeeds in executing onSuccess, and fails to execute onError. At the same time, in o...