You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/style guide.md
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,20 @@
1
1
For testing:
2
-
- try to use .toMatchSnapshot() when possible. Note that it will NOT be possible to make use of .toMatchSnapshot for the component as a whole if 'useContext' is used within the component.
3
-
- if some of the child components of the tested component uses 'useContext' then you should use ShallowRenderer from 'react-test-renderer/shallow' as follows in order to limit the Snapshot to the component itself:
2
+
- try to use .toMatchSnapshot() when possible / relevant. Using asFragment will help bypass issues with useContext:
3
+
```jsx
4
+
it('should match DOM and render "Weight per Tier (%)", "1st place winner" etc. if bounty type is 2', () => {
0 commit comments