File tree 8 files changed +20
-21
lines changed
8 files changed +20
-21
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1
1
{
2
- "gitbook" : " 2.4.3 " ,
2
+ "gitbook" : " 3.2.2 " ,
3
3
"title" : " Enzyme" ,
4
4
"description" : " React Testing" ,
5
- "structure" : {
6
- "summary" : " docs/README.md" ,
7
- "glossary" : " docs/GLOSSARY.md"
8
- },
9
5
"plugins" : [
10
6
" edit-link" ,
11
-
12
- " -highlight" ,
13
7
" github" ,
14
8
" -search" ,
15
9
" codeblock-disable-glossary" ,
Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ like the nodes passed in.
22
22
23
23
24
24
``` jsx
25
+ const style = { fontSize: 13 };
25
26
const wrapper = mount ((
26
27
< div>
27
28
< span className= " foo" > Hello< / span>
28
- < div style= {{ fontSize : 13 } }> Goodbye< / div>
29
+ < div style= {style }> Goodbye< / div>
29
30
< span> Again< / span>
30
31
< / div>
31
32
));
Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ like one of the array passed in.
22
22
23
23
24
24
``` jsx
25
+ const style = { fontSize: 13 };
25
26
const wrapper = mount ((
26
27
< div>
27
28
< span className= " foo" > Hello< / span>
28
- < div style= {{ fontSize : 13 } }> Goodbye< / div>
29
+ < div style= {style }> Goodbye< / div>
29
30
< span> Again< / span>
30
31
< / div>
31
32
));
Original file line number Diff line number Diff line change @@ -24,10 +24,11 @@ like the nodes passed in.
24
24
25
25
26
26
``` jsx
27
+ const style = { fontSize: 13 };
27
28
const wrapper = shallow ((
28
29
< div>
29
30
< span className= " foo" > Hello< / span>
30
- < div style= {{ fontSize : 13 } }> Goodbye< / div>
31
+ < div style= {style }> Goodbye< / div>
31
32
< span> Again< / span>
32
33
< / div>
33
34
));
Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ like one of the array passed in.
22
22
23
23
24
24
``` jsx
25
+ const style = { fontSize: 13 };
25
26
const wrapper = shallow ((
26
27
< div>
27
28
< span className= " foo" > Hello< / span>
28
- < div style= {{ fontSize : 13 } }> Goodbye< / div>
29
+ < div style= {style }> Goodbye< / div>
29
30
< span> Again< / span>
30
31
< / div>
31
32
));
Original file line number Diff line number Diff line change @@ -12,20 +12,20 @@ console when tests are not passing when you expect them to.
12
12
13
13
#### Examples
14
14
``` jsx
15
- function Book ({ title, cover }) {
15
+ function Book ({ title, pages }) {
16
16
return (
17
17
< div>
18
18
< h1 className= " title" > {title}< / h1>
19
- {cover && < BookCover cover = {cover } / > }
19
+ {pages && < NumberOfPages pages = {pages } / > }
20
20
< / div>
21
21
);
22
22
}
23
23
Book .propTypes = {
24
24
title: PropTypes .string .isRequired ,
25
- cover : PropTypes .string ,
25
+ pages : PropTypes .number ,
26
26
};
27
27
Book .defaultProps = {
28
- cover : null ,
28
+ pages : null ,
29
29
};
30
30
```
31
31
``` jsx
@@ -43,11 +43,7 @@ Outputs to console:
43
43
const wrapper = shallow ((
44
44
< Book
45
45
title= " Huckleberry Finn"
46
- cover= {{
47
- url: ' http://some.url/to/img.png' ,
48
- width: 40 ,
49
- height: 80 ,
50
- }}
46
+ pages= " 633 pages"
51
47
/ >
52
48
));
53
49
console .log (wrapper .debug ());
@@ -56,6 +52,6 @@ Outputs to console:
56
52
``` text
57
53
<div>
58
54
<h1 className="title">Huckleberry Finn</h1>
59
- <BookCover cover={{...}} />
55
+ <NumberOfPages pages="633 pages" />
60
56
</div>
61
57
```
Original file line number Diff line number Diff line change 82
82
"eslint-plugin-markdown" : " ^1.0.0-beta.6" ,
83
83
"eslint-plugin-react" : " ^7.2.1" ,
84
84
"gitbook-cli" : " ^1.0.1" ,
85
+ "gitbook-plugin-anchors" : " ^0.7.1" ,
86
+ "gitbook-plugin-codeblock-disable-glossary" : " 0.0.1" ,
87
+ "gitbook-plugin-collapsible-menu" : " ^1.0.3" ,
88
+ "gitbook-plugin-edit-link" : " ^2.0.2" ,
89
+ "gitbook-plugin-github" : " ^2.0.0" ,
85
90
"in-publish" : " ^2.0.0" ,
86
91
"istanbul" : " ^1.0.0-alpha.2" ,
87
92
"jsdom" : " ^6.1.0" ,
You can’t perform that action at this time.
0 commit comments