Skip to content

Commit 8fba8b9

Browse files
committed
Fix docs
1 parent 68b33e7 commit 8fba8b9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/4-creating-test-doubles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ behavior of tests when depended-on objects change.
9696

9797
### object(someObjectWithFunctions)
9898

99-
Suppose you have an object with some functions as properties (and perhaps some non-function properties). If passed to `td.object()`, testdouble.js will do a deep copy of the object and then a shallow search-and-replace of any functions found on the object while and return it.
99+
Suppose you have an object with some functions as properties (and perhaps some non-function properties). If passed to `td.object()`, testdouble.js will do a deep copy of the object and replace of any functions found on the object while and return it.
100100

101101
So, given:
102102

docs/7-replacing-dependencies.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ instead
1818
In both cases, `td.replace` will grab the real dependency and imitate it with an
1919
appropriate fake:
2020

21-
* Plain functions are replaced with test double functions of the same name
22-
* Plain objects are shallow-cloned and their top-level functions are replaced
21+
* Plain functions are replaced with test double functions of the same name,
22+
with all properties deep-cloned and any function properties replaced with
23+
test double functions
24+
* Plain objects are deep-cloned and all functions are replaced
2325
with test double functions
2426
* Constructor functions and ES classes with at least one prototypal function
2527
defined will be extended by an artificial constructor that will have all the

0 commit comments

Comments
 (0)