Skip to content

Commit 45870c2

Browse files
committed
Add previous/next links to documentation files
1 parent d5893fb commit 45870c2

12 files changed

+44
-2
lines changed

docs/1-installation.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,6 @@ QUnit.testDone(function() {
100100
td.reset()
101101
})
102102
```
103+
104+
***
105+
Next: [Purpose](2-howto-purpose.md)

docs/2-howto-purpose.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,7 @@ in adapter functions to fake those adapters instead of the 3rd-party API—this
109109
will decrease the degree to which test doubles will leak throughout the
110110
integrated test suite and afford some opportunity for responding to hard-to-test
111111
situations by improving the API design of your adapters.
112+
113+
***
114+
Previous: [Installing testdouble.js](1-installation.md)
115+
Next: [Getting Started](3-getting-started.md)

docs/3-getting-started.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,3 +354,7 @@ Further reading that documents the features shown off in this tutorial include:
354354
* [Creating test doubles with `function()` and `object()`](4-creating-test-doubles.md)
355355
* [Stubbing responses with `when()`](5-stubbing-results.md)
356356
* [Verifying invocations with `verify()`](6-verifying-invocations.md)
357+
358+
***
359+
Previous: [Purpose](2-howto-purpose.md)
360+
Next: [Creating Test Doubles](4-creating-test-doubles.md)

docs/4-creating-test-doubles.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,7 @@ FakeCat.prototype.scratch // a test double function named '#scratch'
223223
## Conclusion
224224

225225
As you can see, there are a plethora of ways to create test doubles with testdouble.js, each designed to handle a different style of organizing JavaScript code. We recommend on landing on one consistent style (e.g. each module as one function) for each project, which in turn would encourage one consistent style of creating test doubles. This API is written to be flexible for a number of potential contexts across objects, but it has come at the cost of a large enough surface area that if any project were to make ample use of all or most of the above invocation styles, it would confuse readers.
226+
227+
***
228+
Previous: [Getting Started](3-getting-started.md)
229+
Next: [Stubbing behavior](5-stubbing-results.md)

docs/5-stubbing-results.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,3 +622,7 @@ other major feature of any test double library—verifying an invocation took
622622
place—has an API that was carefully-designed to be completely symmetrical! Read
623623
on about [verifying interactions with `verify()`](6-verifying-invocations.md),
624624
and rest easy knowing that you already know exactly how to do it.
625+
626+
***
627+
Previous: [Creating Test Doubles](4-creating-test-doubles.md)
628+
Next: [Verifying interactions](6-verifying-invocations.md)

docs/6-verifying-invocations.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,3 +373,7 @@ td.verify(doNotCall(), {times: 0, ignoreExtraArgs: true}) // passes
373373
And that's everything there is to know about verifying behavior with
374374
testdouble.js! At this point, you know everything you need to know to be pretty
375375
dangerous writing isolated tests.
376+
377+
***
378+
Previous: [Stubbing behavior](5-stubbing-results.md)
379+
Next: [Replacing Real Dependencies with Test Doubles](7-replacing-dependencies.md)

docs/7-replacing-dependencies.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,6 @@ path shouldn't exist yet, a second argument `manualReplacement` can be provided
228228
to short-circuit any attempts to load and imitate a module at
229229
`relativePathToModule`.
230230

231-
231+
***
232+
Previous: [Verifying interactions](6-verifying-invocations.md)
233+
Next: [Custom argument matchers](8-custom-matchers.md)

docs/8-custom-matchers.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,7 @@ opportunity to mutate the matcher instance or have some other side effect. The
6464

6565
For some examples of `td.matchers.create()` in action, check out the
6666
[built-in matchers](src/matchers/index.coffee) provided by testdouble.js.
67+
68+
***
69+
Previous: [Replacing Real Dependencies with Test Doubles](7-replacing-dependencies.md)
70+
Next: [Debugging with testdouble.js](9-debugging.md)

docs/9-debugging.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,6 @@ If you'd like to make `explain()` even better, consider sending a pull request
7979
to make [`explain` describe test double objects](https://github.com/testdouble/testdouble.js/issues/48)
8080
in addition to functions.
8181

82-
82+
***
83+
Previous: [Custom argument matchers](8-custom-matchers.md)
84+
Next: [Plugins](A-plugins.md)

docs/A-plugins.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ testing that a component debounces user input).
4646
This API has been ported for use with testdouble.js by
4747
[@kuy](https://github.com/kuy) as
4848
[testdouble-timers](https://github.com/kuy/testdouble-timers).
49+
50+
***
51+
Previous: [Debugging with testdouble.js](9-debugging.md)
52+
Next: [Frequently Asked Questions](B-frequently-asked-questions.md)

0 commit comments

Comments
 (0)