docs/concepts/stubs/api/rejects.md
stub.rejects()Causes the stub to return a Promise which rejects.
stub.rejects();Causes the stub to return a Promise which rejects with an Error. Use this when you don't care about what the value of the error is.
<<< ../../../.vitepress/tests/docs/stubs/api/rejects-1.test.js
stub.rejects(errorName);Causes the stub to return a Promise which rejects with an Error, with name property set to the errorName argument and a blank message property.
<<< ../../../.vitepress/tests/docs/stubs/api/rejects-2.test.js
stub.rejects(errorName, errorMessage);Causes the stub to return a Promise which rejects with an Error, with name property set to the provided errorName and the message property set to the errorMessage argument.
<<< ../../../.vitepress/tests/docs/stubs/api/rejects-3.test.js
stub.rejects(error);When called with an Error instance, it causes the stub to return a Promise which rejects with the provided error instance.
<<< ../../../.vitepress/tests/docs/stubs/api/rejects-4.test.js
When constructing the Promise, sinon uses the Promise.reject method.