Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike committed Mar 21, 2020
1 parent 0ee315a commit aac9b1f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@ handlers!_
import {horizontalDrag} from 'react-beautiful-dnd-tester`;
it('should drag', () => {
const {getAllByTestId} = render(<SimpleHorizontalList />)
let second = getAllByTestId(/item/i)[1] // target
let first = getAllByTestId(/item/i)[0] // reference
const {getAllByTestId} = render(<SimpleHorizontalList />);
let second = getAllByTestId(/item/i)[1]; // target
let first = getAllByTestId(/item/i)[0]; // reference
horizontalDrag(second).inFrontOf(first)
horizontalDrag(second).inFrontOf(first);
/**
* If you've updated the state correctly,
* the elements will automatically be
* reordered as expected.
**/
const newFirst = getAllByTestId(/item/i)[0]
expect(newFirst.textContent).toBe(second.textContent)
const newFirst = getAllByTestId(/item/i)[0];
expect(newFirst.textContent).toBe(second.textContent);
})
```

Expand Down

0 comments on commit aac9b1f

Please # to comment.