0

The package that has the issues is pupa

I am importing it as

import pupa from 'pupa'

I am running the tests using jest and I have changed my jest.config file

transformIgnorePatterns: [
    `node_modules/(?!(@pupa)/)`,
  ],

On my test file as well I am importing this on the top of my file

/**
 * @jest-environment jsdom
 */
VickyR
  • 145
  • 9
  • Unit testing is usually done in node, why are you doing it in the browser? – I wrestled a bear once. Aug 27 '21 at 13:48
  • Does this answer your question? ["Uncaught SyntaxError: Cannot use import statement outside a module" when importing ECMAScript 6](https://stackoverflow.com/questions/58211880/uncaught-syntaxerror-cannot-use-import-statement-outside-a-module-when-import) – I wrestled a bear once. Aug 27 '21 at 13:48

0 Answers0