sinonjs / sinon

Test spies, stubs and mocks for JavaScript.
https://sinonjs.org/
Other
9.61k stars 769 forks source link

Throw meaningful error message when trying to return non-objects from stub used as constructor #2532

Open fatso83 opened 11 months ago

fatso83 commented 11 months ago

Is your feature request related to a problem? Please describe. See #1676. User's think that not returning a string or other non-object is an error when newing up objects. We should rather explicitly throw an error message saying this is intended.

Describe the solution you'd like Throw an error

stale[bot] commented 7 months ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.