Added a getter for direct access to the intl object
Added a test for new getIntl method
This is to address a quirky little problem we have encountered, whereby we need to pass an intl object into one of our Redux actions. Our current workaround is :
pass the messages object that we create in enzyme in our common setup to our tests
create new intl object in test as required and pass into tests directly
Having an intl getter in this package will mean we can just grab the intl object with all messages/locale already set and pass it straight in to our tests (which would be lovely).
Note - I had some fun and games getting these tests running, looks like maybe mocha-webpack isn't compatible with versions of webpack newer than 3.11.0. I rolled a few things back and made a few hacks here and there to get the tests running enough that I could check my new test worked as expected. Didn't PR my hacky changes to the repo, but can do if required.
https://github.com/thefossedog/enzyme-react-intl/tree/hackityhack
And finally - Awesome tool mate - thanks for your work on this
This is to address a quirky little problem we have encountered, whereby we need to pass an intl object into one of our Redux actions. Our current workaround is :
messages
object that we create in enzyme in our common setup to our testsHaving an intl getter in this package will mean we can just grab the intl object with all messages/locale already set and pass it straight in to our tests (which would be lovely).
Note - I had some fun and games getting these tests running, looks like maybe mocha-webpack isn't compatible with versions of webpack newer than 3.11.0. I rolled a few things back and made a few hacks here and there to get the tests running enough that I could check my new test worked as expected. Didn't PR my hacky changes to the repo, but can do if required. https://github.com/thefossedog/enzyme-react-intl/tree/hackityhack
And finally - Awesome tool mate - thanks for your work on this