Skip to content

Commit 49ef930

Browse files
timgates42mroderick
authored andcommitted
docs: Fix a few typos
There are small typos in: - docs/_howto/stub-dependency.md - docs/index.md Fixes: - Should read `laborious` rather than `laborous`. - Should read `environment` rather than `enviroment`. Signed-off-by: Tim Gates <[email protected]>
1 parent 225b140 commit 49ef930

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/_howto/stub-dependency.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: page
33
title: How to stub a dependency of a module
44
---
55

6-
Sinon is a stubbing library, not a module interception library. Stubbing dependencies is highly dependant on your enviroment and the implementation. For Node environments, we usually recommend solutions targeting [link seams](../link-seams-commonjs/) or explicit dependency injection. Though in some more basic cases, you can get away with only using Sinon by modifying the module exports of the dependency.
6+
Sinon is a stubbing library, not a module interception library. Stubbing dependencies is highly dependant on your environment and the implementation. For Node environments, we usually recommend solutions targeting [link seams](../link-seams-commonjs/) or explicit dependency injection. Though in some more basic cases, you can get away with only using Sinon by modifying the module exports of the dependency.
77

88
To stub a dependency (imported module) of a module under test you have to import it explicitly in your test and stub the desired method. For the stubbing to work, the stubbed method cannot be [destructured](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment), neither in the module under test nor in the test.
99

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Learn more about [fake XMLHttpRequest][fakexhr].
188188

189189
### Fake server
190190

191-
The preceding example shows how flexible this API is. If it looks too laborous, you may like the fake server:
191+
The preceding example shows how flexible this API is. If it looks too laborious, you may like the fake server:
192192

193193
```javascript
194194
var server;

0 commit comments

Comments
 (0)