Browse Source

Added empty view writer test file.

Szymon Kupś 7 years ago
parent
commit
c9b0845f4a
1 changed files with 25 additions and 0 deletions
  1. 25 0
      packages/ckeditor5-engine/tests/view/writer/writer.js

+ 25 - 0
packages/ckeditor5-engine/tests/view/writer/writer.js

@@ -0,0 +1,25 @@
+/**
+ * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+import Writer from '../../../src/view/writer';
+import Document from '../../../src/view/document';
+import Text from '../../../src/view/text';
+
+describe( 'Writer', () => {
+	let writer;
+
+	before( () => {
+		writer = new Writer( new Document() );
+	} );
+
+	describe( 'createText()', () => {
+		it( 'should create Text instance', () => {
+			const text = writer.createText( 'foo bar' );
+
+			expect( text ).to.be.instanceOf( Text );
+			expect( text.data ).to.equal( 'foo bar' );
+		} );
+	} );
+} );