Skip to content

Commit 5a7924a

Browse files
DanKaplanSESfatso83
authored andcommitted
Add createStubInstance header in stubs.md
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.
1 parent ad6804c commit 5a7924a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/release-source/release/stubs.md

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ Note that it's usually better practice to stub individual methods, particularly
9090

9191
Stubbing individual methods tests intent more precisely and is less susceptible to unexpected behavior as the object's code evolves.
9292

93+
#### `var stubInstance = sinon.createStubInstance(MyConstructor, overrides);`
94+
9395
If you want to create a stub object of `MyConstructor`, but don't want the constructor to be invoked, use this utility function.
9496

9597
```javascript

0 commit comments

Comments
 (0)