Open fatso83 opened 11 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.
Is your feature request related to a problem? Please describe. See https://github.com/sinonjs/sinon/issues/2528#issuecomment-1670898956. Currently it seems people get stuck when seeing the error message "Descriptor for property toBeMocked is non-configurable and non-writable" and think this is some sort of error in Sinon.
Describe the solution you'd like I was thinking that it might be useful to have error messages point directly to relevant docs that could give the user some context and possible hints at resolving the issue. So instead of "Descriptor for property toBeMocked is non-configurable and non-writable" change it to something like
(The link is made up by the way). A fix should of course then include a new page in our docs that deals with that specific error. It could contain a short summary of possible reasons the descriptor is immutable (such as transpilation of ESM) and links to articles that show how to solve it.