Skip to content

Instantly share code, notes, and snippets.

@mweibel
Created June 26, 2018 13:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mweibel/3549ec9038212e139821deab3896cb64 to your computer and use it in GitHub Desktop.
Save mweibel/3549ec9038212e139821deab3896cb64 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