8
0
Maciej Bukowski 6 лет назад
Родитель
Сommit
ec600f4b5b

+ 0 - 2
packages/ckeditor5-watchdog/docs/features/watchdog.md

@@ -254,8 +254,6 @@ watchdog.add( {
 
 watchdog.remove( [ 'editor1' ] );
 
-watchdog.add( itemConfig );
-
 // Given item instance.
 const editor1 = watchdog.get( 'editor1' );
 

+ 1 - 5
packages/ckeditor5-watchdog/src/contextwatchdog.js

@@ -213,8 +213,6 @@ export default class ContextWatchdog extends Watchdog {
 	 */
 	remove( itemNames ) {
 		return this._actionQueue.enqueue( () => {
-			console.log( 'remove' );
-
 			return Promise.all( itemNames.map( itemName => {
 				const watchdog = this._getWatchdog( itemName );
 
@@ -269,7 +267,6 @@ export default class ContextWatchdog extends Watchdog {
 	 */
 	_restart() {
 		return this._actionQueue.enqueue( () => {
-			console.log( 'restarting' );
 			this.state = 'initializing';
 
 			return this._destroy()
@@ -277,8 +274,7 @@ export default class ContextWatchdog extends Watchdog {
 					console.error( 'An error happened during destructing.', err );
 				} )
 				.then( () => this._create() )
-				.then( () => this.fire( 'restart' ) )
-				.then( () => console.log( 'restarted' ) );
+				.then( () => this.fire( 'restart' ) );
 		} );
 	}
 

+ 1 - 1
packages/ckeditor5-watchdog/tests/contextwatchdog.js

@@ -234,7 +234,7 @@ describe( 'ContextWatchdog', () => {
 			await watchdog.destroy();
 
 			expect( err ).to.be.instanceOf( Error );
-			expect( err.message ).to.match( /There is no watchdog named: 'foo'\./ );
+			expect( err.message ).to.match( /Item with the given name was not registered: foo\./ );
 		} );
 
 		it( 'should throw when the item is added before the context is created', async () => {