Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

o.getChildContext #31

Open
tahv0 opened this issue Feb 18, 2020 · 5 comments
Open

o.getChildContext #31

tahv0 opened this issue Feb 18, 2020 · 5 comments

Comments

@tahv0
Copy link

tahv0 commented Feb 18, 2020

 FAIL  src/components/StartMenu/StartMenu.test.tsx
  ● <StartMenu /> › renders StartMenu component

    TypeError: o.getChildContext is not a function

       9 | describe('<StartMenu />', () => {
      10 |   it('renders StartMenu component', () => {
    > 11 |     const wrapper = mountWithIntl(<StartMenu toggleSettings={() => {}} />);
         |                     ^
      12 |     expect(wrapper.find('.MainMenuItem')).to.have.lengthOf(4);
      13 |   });
      14 | });

      at mountWithIntl (node_modules/enzyme-react-intl/lib/webpack:/enzyme-react-intl/src/index.js:59:25)
      at Object.it (src/components/StartMenu/StartMenu.test.tsx:11:21)
@atav32
Copy link

atav32 commented Apr 2, 2020

@gdollard
Copy link

this works for now, https://github.com/formatjs/react-intl/blob/master/docs/Testing-with-React-Intl.md#enzyme

link is broken and no, it's not working for me.

@henrikericsson
Copy link

Any update on this? Getting the same error.

@davisyi
Copy link

davisyi commented Oct 14, 2020

I assume you and I all have this issue because of we all use react-intl v3 or up and enzyme-react-intl still uses react-intl v2.
Any timeline for upgrading react-intl?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants