https://github.com/colinrobertbrooks/react-beautiful-dnd-test-utils
Test utils for react-beautiful-dnd built with react-testing-library 🧤
https://github.com/colinrobertbrooks/react-beautiful-dnd-test-utils
dnd drag-and-drop react testing
Last synced: 5 months ago
JSON representation
Test utils for react-beautiful-dnd built with react-testing-library 🧤
- Host: GitHub
- URL: https://github.com/colinrobertbrooks/react-beautiful-dnd-test-utils
- Owner: colinrobertbrooks
- License: mit
- Created: 2019-05-09T17:00:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T22:38:25.000Z (over 2 years ago)
- Last Synced: 2024-11-11T01:41:48.409Z (11 months ago)
- Topics: dnd, drag-and-drop, react, testing
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/react-beautiful-dnd-test-utils
- Size: 489 KB
- Stars: 32
- Watchers: 2
- Forks: 14
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
react-beautiful-dnd-test-utils
![]()
Test utils for react-beautiful-dnd (rbd) built with react-testing-library.
[](https://github.com/colinrobertbrooks/react-beautiful-dnd-test-utils/actions/workflows/main.yml)
[](https://www.npmjs.com/package/react-beautiful-dnd-test-utils)
[](http://www.npmtrends.com/react-beautiful-dnd-test-utils)
[](https://github.com/colinrobertbrooks/react-beautiful-dnd-test-utils/blob/master/LICENSE)## Installation
This module is distributed via [`npm`](https://www.npmjs.com/), which is bundled with [`node`](https://nodejs.org/en/), and
should be installed as one of your project's `devDependencies`:```
npm install --save-dev react-beautiful-dnd-test-utils
```The following packages must also be installed:
- `@testing-library/jest-dom`
- `@testing-library/react`
- `@testing-library/user-event`
- `jest`## Supported versions of `rbd`
Versions 3+ of this library supports testing `rbd` version 12+. Use version 2 of this library for testing `rbd` version 11.
## Usage
Currently supports moving a [``](https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/api/draggable.md) _n_ positions up or down inside a [``](https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/api/droppable.md).
See an [example test](./example/src/App.test.tsx).
## License
MIT