-
Notifications
You must be signed in to change notification settings - Fork 101
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
CKEditor5 Jest Testing - TypeError: Cannot read properties of null (reading 'model') #351
Comments
I also have this issue. Does anyone have any insight into how to fix it? @jiefugong |
This appears to be fixed in version 5.0.6 |
Sounds good. @jiefugong, could you confirm? |
I currently have that same error, running on v5.0.6, started right after I upgraded from v5.0.2. |
Have this same issue working in next.js. I'm not running any tests, just using the editor like normal. Everything works fine, saves to the db but I can't stop this error from popping afterwards. "The config.initialData option cannot be used together with initial data passed as the first parameter of Editor.create()." |
Any news on this ? |
I get both of these errors (in v6) when testing in jest when I render the component containing the editor, and then change some prop in the test that causes a re-render without the editor (e.g. let's say I change a "show" prop to "hide", which conditionally doesn't render the editor). If that happens fast enough, it makes the ckeditor react component try to tear itself down before it has completely rendered, which makes the I'd say the fix is to write that async and watchdog code a bit more defensively. |
Any chance someone experiencing this could take #383 for a spin? It solves my problem, but I'm not completely sure they are the same problem :) . |
#370 seems related as well. All about the same destroy watchdog. |
Hi,
I'm using the CKEditor5 React Component with one of the ready-to-use editor builds -- specifically, the
ClassicEditor
. I've installed both of these usingyarn
in my local project and have code that is 100% identical to the example given on this quick start pageSo far, using the editor itself has been fine in my application. However, when I attempt to write Jest tests for this component I get the following error:
My Jest test is incredibly simple:
I've seen some separate issues filed for general wonkiness of using Jest with CKEditor 5 though most of the time it's looked like an issue with either a custom build and some faulty webpack configuration. I'm not sure if this falls into the same category since it appears to involve the watchdog specifically
The text was updated successfully, but these errors were encountered: