Jest transformIgnorePatterns not working : <p>I have spent a long time looking at other questions about this and looking at other projects on Github but none of the answers seem to work for me.</p>

<p>I am loading a third party library in my project, and when running Jest tests I get the error</p>

<pre><code>export default portalCommunication;
^^^^^^

SyntaxError: Unexpected token export

&gt; 1 | import portalCommunication from 'mathletics-portal-communication-service';
</code></pre>

<p>I have tried updating my Jest config in many ways to get it to transpile this library but I always get the same error.</p>

<p>This is my current jest.config.js file:</p>

<pre><code>module.exports = {
    moduleNameMapper: {
        '\\.(css|scss)$': 'identity-obj-proxy',
        '\\.svg$': '&lt;rootDir&gt;/test/mocks/svg-mock.js'
    },
    setupFiles: ['./test/test-setup.js'],
    transformIgnorePatterns: [
        '&lt;rootDir&gt;/node_modules/(?!mathletics-portal-communication-service)'
    ]
};
</code></pre>

<p>I have also tried adding the transform property to run babel-jest against this mathletics-portal-communication-service directory.</p>

<p>Please help!</p>
