8
0
Pārlūkot izejas kodu

Removed imports to sinon and chai.

Maciej Bukowski 5 gadi atpakaļ
vecāks
revīzija
67de7bc718

+ 2 - 0
packages/ckeditor5-watchdog/src/contextwatchdog.js

@@ -358,6 +358,8 @@ class ActionQueue {
 		this._queuedActions.push( action );
 
 		if ( this._queuedActions.length > 1 ) {
+			// This means that the action handler is already running.
+			// Hence we can just register the resolve callback and wait.
 			return new Promise( res => {
 				this._resolveCallbacks.set( action, res );
 			} );

+ 0 - 2
packages/ckeditor5-watchdog/tests/contextwatchdog.js

@@ -8,8 +8,6 @@
 import ContextWatchdog from '../src/contextwatchdog';
 import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
 import Context from '@ckeditor/ckeditor5-core/src/context';
-import sinon from 'sinon';
-import { expect } from 'chai';
 import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
 
 describe( 'ContextWatchdog', () => {

+ 0 - 2
packages/ckeditor5-watchdog/tests/editorwatchdog.js

@@ -12,8 +12,6 @@ import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import { assertCKEditorError } from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
 import HtmlDataProcessor from '@ckeditor/ckeditor5-engine/src/dataprocessor/htmldataprocessor';
-import sinon from 'sinon';
-import { expect } from 'chai';
 
 // The error handling testing with mocha & chai is quite broken and hard to test.
 // sinon.stub( window, 'onerror' ).value( undefined ); and similar do not work.