Skip to content

Commit 8c3e304

Browse files
Merge pull request #1039 from samit4me/update-gitbook
Update to GitBook 3
2 parents 2151b1c + f271127 commit 8c3e304

8 files changed

+20
-21
lines changed

docs/README.md SUMMARY.md

File renamed without changes.

book.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
{
2-
"gitbook": "2.4.3",
2+
"gitbook": "3.2.2",
33
"title": "Enzyme",
44
"description": "React Testing",
5-
"structure": {
6-
"summary": "docs/README.md",
7-
"glossary": "docs/GLOSSARY.md"
8-
},
95
"plugins": [
106
"edit-link",
11-
12-
"-highlight",
137
"github",
148
"-search",
159
"codeblock-disable-glossary",

docs/api/ReactWrapper/containsAllMatchingElements.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ like the nodes passed in.
2222

2323

2424
```jsx
25+
const style = { fontSize: 13 };
2526
const wrapper = mount((
2627
<div>
2728
<span className="foo">Hello</span>
28-
<div style={{ fontSize: 13 }}>Goodbye</div>
29+
<div style={style}>Goodbye</div>
2930
<span>Again</span>
3031
</div>
3132
));

docs/api/ReactWrapper/containsAnyMatchingElements.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ like one of the array passed in.
2222

2323

2424
```jsx
25+
const style = { fontSize: 13 };
2526
const wrapper = mount((
2627
<div>
2728
<span className="foo">Hello</span>
28-
<div style={{ fontSize: 13 }}>Goodbye</div>
29+
<div style={style}>Goodbye</div>
2930
<span>Again</span>
3031
</div>
3132
));

docs/api/ShallowWrapper/containsAllMatchingElements.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ like the nodes passed in.
2424

2525

2626
```jsx
27+
const style = { fontSize: 13 };
2728
const wrapper = shallow((
2829
<div>
2930
<span className="foo">Hello</span>
30-
<div style={{ fontSize: 13 }}>Goodbye</div>
31+
<div style={style}>Goodbye</div>
3132
<span>Again</span>
3233
</div>
3334
));

docs/api/ShallowWrapper/containsAnyMatchingElements.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ like one of the array passed in.
2222

2323

2424
```jsx
25+
const style = { fontSize: 13 };
2526
const wrapper = shallow((
2627
<div>
2728
<span className="foo">Hello</span>
28-
<div style={{ fontSize: 13 }}>Goodbye</div>
29+
<div style={style}>Goodbye</div>
2930
<span>Again</span>
3031
</div>
3132
));

docs/api/ShallowWrapper/debug.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ console when tests are not passing when you expect them to.
1212

1313
#### Examples
1414
```jsx
15-
function Book({ title, cover }) {
15+
function Book({ title, pages }) {
1616
return (
1717
<div>
1818
<h1 className="title">{title}</h1>
19-
{cover && <BookCover cover={cover} />}
19+
{pages && <NumberOfPages pages={pages} />}
2020
</div>
2121
);
2222
}
2323
Book.propTypes = {
2424
title: PropTypes.string.isRequired,
25-
cover: PropTypes.string,
25+
pages: PropTypes.number,
2626
};
2727
Book.defaultProps = {
28-
cover: null,
28+
pages: null,
2929
};
3030
```
3131
```jsx
@@ -43,11 +43,7 @@ Outputs to console:
4343
const wrapper = shallow((
4444
<Book
4545
title="Huckleberry Finn"
46-
cover={{
47-
url: 'http://some.url/to/img.png',
48-
width: 40,
49-
height: 80,
50-
}}
46+
pages="633 pages"
5147
/>
5248
));
5349
console.log(wrapper.debug());
@@ -56,6 +52,6 @@ Outputs to console:
5652
```text
5753
<div>
5854
<h1 className="title">Huckleberry Finn</h1>
59-
<BookCover cover={{...}} />
55+
<NumberOfPages pages="633 pages" />
6056
</div>
6157
```

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@
8282
"eslint-plugin-markdown": "^1.0.0-beta.6",
8383
"eslint-plugin-react": "^7.2.1",
8484
"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",
8590
"in-publish": "^2.0.0",
8691
"istanbul": "^1.0.0-alpha.2",
8792
"jsdom": "^6.1.0",

0 commit comments

Comments
 (0)