ckeditor / ckeditor5-angular

Official CKEditor 5 Angular 5+ component.
https://ckeditor.com/ckeditor-5
Other
202 stars 110 forks source link

SyntaxError: Unexpected token 'export' While test with Jest #400

Open bschauhan opened 8 months ago

bschauhan commented 8 months ago

`/home/bharat/www/genera-monorepo/node_modules/@ckeditor/ckeditor5-watchdog/src/index.js:8 export { default as ContextWatchdog } from './contextwatchdog'; ^^^^^^

SyntaxError: Unexpected token 'export'

   5 |   CommonModule,
   6 | } from '@angular/common';
>  7 | import {
     | ^
   8 |   CKEditorModule,
   9 | } from '@ckeditor/ckeditor5-angular';
  10 | import  DecoupledEditor  from '@ckeditor/ckeditor5-build-decoupled-document';

  at Runtime.createScriptFromCode (../../node_modules/jest-runtime/build/index.js:1495:14)
  at Object.<anonymous> (../../node_modules/@ckeditor/ckeditor5-angular/fesm2015/ckeditor-ckeditor5-angular.mjs:4:32)
  at Object.<anonymous> (src/lib/title-text-editor/title-text-editor.component.ts:7:1)
  at Object.<anonymous> (src/lib/title-text-editor/title-text-editor.component.spec.ts:4:1)`
Witoso commented 8 months ago

Hi! Please provide some reproducible samples that we could use. Our code uses ESM syntax, make sure that Jest understands it.