title: Testing react-intl components with enzyme
body: <p>I have looked into react-intl for suggestions but it doesn't leave any explicit documentation for <a href="https://github.com/yahoo/react-intl/wiki/Testing-with-React-Intl#enzyme">enzyme</a>.</p>
  
  <p>This is how I have been trying to write my tests.</p>
  
  <pre><code>import {IntlProvider} from 'react-intl';
  
  const intlProvider = new IntlProvider({locale: 'en'}, {});
  const intl = intlProvider.getChildContext();
  const customMessage = shallow(&lt;CustomMessage /&gt;, { options: { context: intl } });
  </code></pre>
  
  <p>But I keep getting the error </p>
  
  <blockquote>
    <p>Invariant Violation: [React Intl] Could not find required <code>intl</code> object.  needs to exist in the component ancestry.</p>
  </blockquote>
  
  <p>I looked into their repo and they seems to have <a href="https://github.com/yahoo/react-intl/blob/master/test/unit/components/date.js#L109-L129">made it work</a> with 'react-addons-test-utils'. </p>
  
  <p>Am I doing something wrong?</p>