Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciosoares committed Feb 16, 2016
1 parent cdd84df commit 9d11d58
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* [is(selector)](/docs/api/ShallowWrapper/is.md)
* [not(selector)](/docs/api/ShallowWrapper/not.md)
* [children()](/docs/api/ShallowWrapper/children.md)
* [childAt()](/docs/api/ShallowWrapper/childAt.md)
* [parents()](/docs/api/ShallowWrapper/parents.md)
* [parent()](/docs/api/ShallowWrapper/parent.md)
* [closest(selector)](/docs/api/ShallowWrapper/closest.md)
Expand Down Expand Up @@ -65,6 +66,7 @@
* [is(selector)](/docs/api/ReactWrapper/is.md)
* [not(selector)](/docs/api/ReactWrapper/not.md)
* [children()](/docs/api/ReactWrapper/children.md)
* [childAt()](/docs/api/ReactWrapper/childAt.md)
* [parents()](/docs/api/ReactWrapper/parents.md)
* [parent()](/docs/api/ReactWrapper/parent.md)
* [closest(selector)](/docs/api/ReactWrapper/closest.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ReactWrapper/childAt.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Returns a new wrapper with child at the specified index.

```jsx
const wrapper = mount(<ToDoList items={items} />);
expect(wrapper.find('ul').childAt(0).type).to.equal('li');
expect(wrapper.find('ul').childAt(0).type()).to.equal('li');
```

#### Related Methods
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ShallowWrapper/childAt.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Returns a new wrapper with child at the specified index.

```jsx
const wrapper = shallow(<ToDoList items={items} />);
expect(wrapper.find('ul').childAt(0).type).to.equal('li');
expect(wrapper.find('ul').childAt(0).type()).to.equal('li');
```

#### Related Methods
Expand Down
11 changes: 7 additions & 4 deletions docs/api/mount.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Full DOM rendering is ideal for use cases where you have components that may int
or may require the full lifecycle in order to fully test the component (ie, `componentDidMount`
etc.)

Full DOM rendering requires that a full DOM API be available at the global scope. This means that
it must be run in an environment that at least "looks like" a browser environment. If you do not
want to run your tests inside of a browser, the recommended approach to using `mount` is to depend
on a library called [jsdom](https://github.com/tmpvar/jsdom) which is essentially a headless browser
Full DOM rendering requires that a full DOM API be available at the global scope. This means that
it must be run in an environment that at least "looks like" a browser environment. If you do not
want to run your tests inside of a browser, the recommended approach to using `mount` is to depend
on a library called [jsdom](https://github.com/tmpvar/jsdom) which is essentially a headless browser
implemented completely in JS.

```jsx
Expand Down Expand Up @@ -84,6 +84,9 @@ Remove nodes in the current wrapper that match the provided selector. (inverse o
#### [`.children() => ReactWrapper`](ReactWrapper/children.md)
Get a wrapper with all of the children nodes of the current wrapper.

#### [`.childAt() => ReactWrapper`](ReactWrapper/childAt.md)
Returns a new wrapper with child at the specified index.

#### [`.parents() => ReactWrapper`](ReactWrapper/parents.md)
Get a wrapper with all of the parents (ancestors) of the current node.

Expand Down
5 changes: 4 additions & 1 deletion docs/api/shallow.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('<MyComponent />', () => {
#### Arguments

1. `node` (`ReactElement`): The node to render
2. `options` (`Object` [optional]):
2. `options` (`Object` [optional]):
- `options.context`: (`Object` [optional]): Context to be passed into the component

#### Returns
Expand Down Expand Up @@ -85,6 +85,9 @@ Remove nodes in the current wrapper that match the provided selector. (inverse o
#### [`.children() => ShallowWrapper`](ShallowWrapper/children.md)
Get a wrapper with all of the children nodes of the current wrapper.

#### [`.childAt() => ShallowWrapper`](ShallowWrapper/childAt.md)
Returns a new wrapper with child at the specified index.

#### [`.parents() => ShallowWrapper`](ShallowWrapper/parents.md)
Get a wrapper with all of the parents (ancestors) of the current node.

Expand Down

0 comments on commit 9d11d58

Please sign in to comment.