瀏覽代碼

Add unit test for undefined wordcount container.

Mateusz Samsel 6 年之前
父節點
當前提交
d44f94d523
共有 1 個文件被更改,包括 17 次插入0 次删除
  1. 17 0
      packages/ckeditor5-word-count/tests/wordcount.js

+ 17 - 0
packages/ckeditor5-word-count/tests/wordcount.js

@@ -158,6 +158,23 @@ describe( 'WordCount', () => {
 					.then( done )
 					.then( done )
 					.catch( done );
 					.catch( done );
 			} );
 			} );
+
+			describe( 'container not created', () => {
+				let editor;
+
+				beforeEach( () => {
+					return VirtualTestEditor.create( {
+						plugins: [ WordCount, Paragraph ]
+					} )
+						.then( _editor => {
+							editor = _editor;
+						} );
+				} );
+
+				it( 'should not throw an error', () => {
+					return editor.destroy();
+				} );
+			} );
 		} );
 		} );
 	} );
 	} );