Skip to content

Commit 68b1ec4

Browse files
bernardobelchioralexkrolick
authored andcommitted
Fix react-testing-library missing links (#321) (#48)
Fix testing-library/react-testing-library#321
1 parent 1dfc3ad commit 68b1ec4

File tree

1 file changed

+3
-3
lines changed
  • docs/react-testing-library

1 file changed

+3
-3
lines changed

docs/react-testing-library/faq.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ As you write your tests, keep in mind:
8484
<summary>If I can't use shallow rendering, how do I mock out components in tests?</summary>
8585

8686
In general, you should avoid mocking out components (see
87-
[the Guiding Principles section](./guiding-principles)). However if you need to,
87+
[the Guiding Principles section](../guiding-principles)). However if you need to,
8888
then it's pretty trivial using
8989
[Jest's mocking feature](https://facebook.github.io/jest/docs/en/manual-mocks.html).
9090
One case that I've found mocking to be especially useful is for animation
@@ -116,14 +116,14 @@ test('you can mock things with jest.mock', () => {
116116
Note that because they're Jest mock functions (`jest.fn()`), you could also make
117117
assertions on those as well if you wanted.
118118

119-
[Open full test](./example-react-transition-group) for the full example.
119+
[Open full test](../example-react-transition-group) for the full example.
120120

121121
This looks like more work that shallow rendering (and it is), but it gives you
122122
more confidence so long as your mock resembles the thing you're mocking closely
123123
enough.
124124

125125
If you want to make things more like shallow rendering, then you could do
126-
something more [like this]([Open full test](./example-react-transition-group) ).
126+
something more [like this]([Open full test](../example-react-transition-group) ).
127127

128128
Learn more about how Jest mocks work from my blog post:
129129
["But really, what is a JavaScript mock?"](https://blog.kentcdodds.com/but-really-what-is-a-javascript-mock-10d060966f7d)

0 commit comments

Comments
 (0)