The explanation given in the documentation for sinon regarding stub.yields is as follows:
By using stub.yields([arg1, arg2, ...]), you are essentially performing a function similar to callsArg.
This will result in the stub executing the first callback it receives with the specified arguments (if any).
In scenarios where a method has multiple callbacks, yieldsRight must be used to call the last callback or callsArg should be utilized to have the stub trigger callbacks other than the first or last one.
After reading this particular section multiple times, it still remains unclear and especially confusing when trying to comprehend the emphasized part.
To aid my understanding, I require a more detailed explanation along with a couple of examples demonstrating the usage of yields
(which the official documentation fails to provide).