ej2-angular-ui-components icon indicating copy to clipboard operation
ej2-angular-ui-components copied to clipboard

Issues with Jest and mjs files

Open TheDevelolper opened this issue 3 years ago • 1 comments

Hello,

I'm trying to use Syncfusion in our Nx Angular application which uses jest for testing. However because sync fusion grid seems to be using mjs files the tests are failing with:

SyntaxError: Cannot use import statement outside a module

My current jest config contains the following but it just doesn't work:

 moduleFileExtensions: ["ts", "js", "mjs"],
  transform: {
    '^.+\\.(ts|js|mjs|html)$': 'jest-preset-angular'
  },
  transformIgnorePatterns: [
    'node_modules/(?!.*.mjs$|@ckeditor)'
  ],

Can someone please help?

TheDevelolper avatar Jul 20 '22 14:07 TheDevelolper

This issue has been closed due to no response from the original author. Please feel free to reopen, if you have more information that can help us investigate the issue further.

syncsiva avatar Oct 07 '22 09:10 syncsiva