Skip to content

Instantly share code, notes, and snippets.

@yuriitaran
Forked from mweibel/Foo.test.js
Created September 15, 2018 06:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuriitaran/aba79ba4de4b372497c405c4b9a793a8 to your computer and use it in GitHub Desktop.
Save yuriitaran/aba79ba4de4b372497c405c4b9a793a8 to your computer and use it in GitHub Desktop.
Mock react-beautiful-dnd
// mocks react-beautiful-dnd Droppable without the need of a DragDropContext etc.
jest.mock('react-beautiful-dnd', () => ({
Droppable: jest.fn(
// params to children are `provider`, `snapshot`
({children}) => children({}, {})
)
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment