Throw meaningful error message when trying to return non-objects from stub used as constructor
Open
Nobody has claimed this yet.
Documentation
wontfix
- Dominant language
- JavaScript
- Stars
- 9.8k
- Forks
- 809
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading issue #1676 and locating the stub behavior used as a constructor. Done means that returning a non-object from such a stub produces a meaningful explicit error, with a regression test covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100