-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Watchdog.create() call test case silently failing #6042
Comments
In this case we should temporarily remove the test until this is resolved, so there's no leak affecting other tests. The main problem now is that it triggers a promise, and doesn't wait for it, so the leak kicks in 1 / 2 tests later (as mocha is not aware that something is till happening so it starts next test cases). |
Yep, I can confirm it, that test wait for the |
Karma (or rather mocha) mutes all promise rejections between tests unfortunately. |
… what it is meant to test. See ckeditor/ckeditor5#6042 for more information.
Bonus: If you add a test after this last one https://github.com/ckeditor/ckeditor5-watchdog/blob/9b6ace1ab5050355f49f264c0231b68351d495c4/tests/watchdog.js#L1033, it will never be executed. I tried adding one with just debugger call to see the state of DOM and it never ran. diff --git a/tests/watchdog.js b/tests/watchdog.js
index c69f21b..620df4a 100644
--- a/tests/watchdog.js
+++ b/tests/watchdog.js
@@ -1087,6 +1087,14 @@ describe( 'Watchdog', () => {
} );
} );
} );
+
+ describe( 'cleanup category', () => {
+ it( 'cleanup test ', () => {
+ expect( true ).to.be.true;
+
+ debugger;
+ } );
+ } );
} );
function throwCKEditorError( name, context ) { |
Maybe it's somehow connected with the |
Feature: Introduced `ContextWatchdog` which is a watchdog for `Context`. Closes ckeditor/ckeditor5#6079. Closes ckeditor/ckeditor5#6042. Closes ckeditor/ckeditor5#4696. BREAKING CHANGE: The `Watchdog` class was renamed to `EditorWatchdog` and is available in `src/editorwatchdog.js`. BREAKING CHANGE: The `EditorWatchdog.for()` method was removed in favor of the constructor. BREAKING CHANGE: The `EditorWatchdog#constructor()` API changed, now the `EditorWatchdog` accepts the editor class as the first argument and the watchdog configuration as the second argument. The `EditorWatchdog` editor creator now defaults to `( sourceElementOrData, config ) => Editor.create( sourceElementOrData, config )`.
📝 Provide detailed reproduction steps (if any)
While working on #6002 I noticed that the "should not throw an error when the destructor is not defined" unit case is causing DOM leaks.
Upon closer look it turned out that the promise returned by
watchdog.create()
is silently rejected (rejection caused by unhandled exception).Two things here:
📃 Other details
This issue might be related to #5897.
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: