I am trying for the first time to use React context API to pass information from a main component to his grandchild component.
So first I have created a context
Enzyme context affects legacy React context, not modern context API. It should be mocked with:
context
mount()
And asserted with:
expect(wrapper.find('h2').text()).toBe('Context value: 987');