Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: selection_js_1.default is not a constructor in Quill Module Handling During Testing #4408

Open
kurosfa opened this issue Sep 13, 2024 · 0 comments

Comments

@kurosfa
Copy link

kurosfa commented Sep 13, 2024

I'm encountering an issue when trying to use Quill with a custom module in tests. Specifically, I get a TypeError: selection_js_1.default is not a constructor error. This seems related to the handling of modules like selection in Quill.

Steps for Reproduction

Create a new Angular project with Quill as a dependency.
Create a component that uses Quill with custom modules.
Set up a test for this component.
Run the test, and observe the error: TypeError: selection_js_1.default is not a constructor.
Expected Behavior

Quill should properly handle and construct instances of its modules, including selection, without causing errors in the test environment.

Actual Behavior

When running tests, the following error occurs: TypeError: selection_js_1.default is not a constructor. This indicates that Quill's module handling is not functioning as expected in the testing context.

Quill: 2.0.2
Additional Information

I am using a custom TexBlot for handling LaTeX formulas. The issue seems related to Quill’s internal handling of modules, particularly the selection module.
The problem might be connected to how Quill is imported and how its modules are registered or used in the test environment.
A minimal reproducible example and detailed test setup can be provided upon request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant