kensnyder / quill-image-resize-module

A module for Quill rich text editor to allow images to be resized.
MIT License
467 stars 468 forks source link

Angular Test suite failed to run: TypeError: Cannot read property 'imports' of undefined #117

Closed nullptrerror closed 1 year ago

nullptrerror commented 3 years ago

I have a file called quillConfigMultimedia with the following:

import Quill from 'quill';
import { ImageResize } from 'quill-image-resize-module';
Quill.register('modules/imageResize', ImageResize);

export const quillConfigMultimedia = {
  modules: {
    toolbar: [
      ['bold', 'italic', 'underline', 'strike'], // toggled buttons
      [{ list: 'ordered' }, { list: 'bullet' }],
      [{ script: 'sub' }, { script: 'super' }], // superscript/subscript
      [{ indent: '-1' }, { indent: '+1' }], // outdent/indent
      [{ size: ['10px', false, '18px', '32px'] }], // custom dropdown
      [{ color: [] }, { background: [] }], // dropdown with defaults from theme
      [{ align: [] }],
      ['clean'], // remove formatting button
      ['link', 'image', 'video'], // link and image, video
    ],
    imageResize: {},
  },
  theme: 'snow',
};

When my test runs I get the following error.

image

My component with failing test: image

denisr-w commented 3 years ago

Try adding _./node_modules/quill/dist/quill.min.js_ under scripts for test in angular.json