forked from enzymejs/enzyme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made get return raw node and added an at method
- Loading branch information
1 parent
0134ebf
commit 7a3209d
Showing
8 changed files
with
153 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# `.at(index) => ShallowWrapper` | ||
|
||
Returns a wrapper around the node at a given index of the current wrapper. | ||
|
||
|
||
#### Arguments | ||
|
||
1. `index` (`Number`): A zero-based integer indicating which node to retrieve. | ||
|
||
|
||
|
||
#### Returns | ||
|
||
`ShallowWrapper`: A new wrapper that wraps the retrieved node. | ||
|
||
|
||
|
||
#### Examples | ||
|
||
```jsx | ||
const wrapper = shallow(<MyComponent />); | ||
expect(wrapper.find(Foo).at(0).props().foo).to.equal("bar"); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.