sinonjs / sinon

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

Add createStubInstance header in stubs.md #2576

Open DanKaplanSES opened 6 months ago

DanKaplanSES commented 6 months ago

Purpose (TL;DR) - mandatory

I kept scrolling past the parts of this page that explain createStubInstance so I created a section for it. I think the reason it didn't already exist is because it's considered a part of the utilities API, not the stub API. Even if that's the reasoning, I hope this PR is still a net positive, because personally, it makes it easier to find what I'm looking for.

How to verify - mandatory

  1. Check out this branch
  2. npm install

The documentation contribute in guide led me to believe that this doesn't apply to documentation changes. Let me know if I misinterpreted it, though.

Checklist for author

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (adcf936) 96.02% compared to head (123df37) 96.02%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2576 +/- ## ======================================= Coverage 96.02% 96.02% ======================================= Files 40 40 Lines 1912 1912 ======================================= Hits 1836 1836 Misses 76 76 ``` | [Flag](https://app.codecov.io/gh/sinonjs/sinon/pull/2576/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sinonjs) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/sinonjs/sinon/pull/2576/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sinonjs) | `96.02% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=sinonjs#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fatso83 commented 4 months ago

I think this was mostly done, apart from a few tiny changes. Any chance you will get to complete this? Think it's less than 10 minutes of work.

fatso83 commented 2 months ago

@DanKaplanSES ? should I move it over the finish line?

DanKaplanSES commented 2 months ago

@DanKaplanSES ? should I move it over the finish line?

Apologies, yeah I think that would be best; I don't fully understand what change you're suggesting.