Document how to do simple dependency injection
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9.8k
- Forks
- 809
- PR merge metrics
- No merged PRs in 30d
Description
There are usually three main categories of stubbing when dealing with network requests:
- stubbing out the api doing the actual network calls using a link seam
- stubbing out the api doing the actual network calls using dependency injection of some sort
- stubbing out the network layer in the underlying engine (browser or Node)
Presently we only have one article covering the first option, and very little on the two next approaches. We should create a small how-to for the article section that covers how to do basic (no framework) dependency injection.
I have already written a lot of text that could serve as the basis for such an article.
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 in the article section and review the existing article covering link-seam stubbing, then use the linked Stack Overflow answer and Sinon issue comment as source material. The work is done when a small how-to explains basic, framework-free dependency injection for stubbing network-request dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100