title: failed mock stripe on lambda function : TypeError: stripe_1.default is not a constructor
body: <p>i want to mock stripe sdk on lambda function, this is how i create instance of stripe on config</p>
  <pre><code>export const stripe = new Stripe(STRIPE_SECRET_KEY, {
    apiVersion: '2020-08-27',
    typescript: true,
    maxNetworkRetries: 2,
  });
  </code></pre>
  <p>and this is how i use the stripe instance on my lambda function</p>
  <pre><code>import { stripe, STRIPE_TEST_USERS } from '../config';
  
  await stripe.invoices.retrieve(id)
  </code></pre>
  <p>and this is what i got</p>
  <pre><code>  TypeError: stripe_1.default is not a constructor
  
    36 | });
    37 |
  &gt; 38 | export const stripe = new Stripe(STRIPE_SECRET_KEY, {
       |                       ^
    39 |   apiVersion: '2020-08-27',
    40 |   typescript: true,
    41 |   maxNetworkRetries: 2,
  </code></pre>
  <p>dont get me wrong , i have tried all thing i can do, i have tried this method</p>
  <p>1st</p>
  <pre><code> jest.mock(&quot;stripe&quot;, () =&gt; {
        return jest.fn().mockImplementation(()=&gt; {
          return {
            invoices: {
              retrieve: () =&gt;jest.fn(),
            },
          };
        });
      });
  </code></pre>
  <p>2nd</p>
  <pre><code>jest.mock('stripe', () =&gt;
     jest.fn().mockImplementation(() =&gt; ({
      invoices: {
        retrieve: () =&gt; jest.fn()
     },
    }))
   );
  </code></pre>
  <p>3rd</p>
  <pre><code>jest.mock('stripe', () =&gt; ({
    ...jest.mock('stripe'),
    Stripe: jest.fn().mockImplementation(() =&gt; {
      return {
        invoices: jest.fn().mockImplementation(() =&gt; {
          return {
            retrieve: jest.fn(),
          };
        }),
      };
    }),
  }));
  </code></pre>
  <p>but none of those work, any solution?</p>