Bug.
Component should not raise warning during test
The test warn me about
Warning: Failed context type: The context `private-drag-drop-key-do-not-use-store-droppable-id` is marked as required in `Draggable`, but its value is `undefined`.
This test produce this warning
test('actually renders the component', () => {
const store = createMockStore(sampleState);
const container = mount(
<Provider store={store}>
<DragDropContext onDragEnd={() => {}}>
<Container /> // Container contains a Draggable element
</DragDropContext>
</Provider>,
);
expect(container.html()).toMatchSnapshot();
});
What is producing this warning? What am I doing wrong?
You need to wrap draggables inside a droppable. It is complaining because it cannot find the droppable id that a droppable puts on the context
Most helpful comment
You need to wrap draggables inside a droppable. It is complaining because it cannot find the droppable id that a droppable puts on the context