writer.js 617 B

12345678910111213141516171819202122232425
  1. /**
  2. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import Writer from '../../../src/view/writer';
  6. import Document from '../../../src/view/document';
  7. import Text from '../../../src/view/text';
  8. describe( 'Writer', () => {
  9. let writer;
  10. before( () => {
  11. writer = new Writer( new Document() );
  12. } );
  13. describe( 'createText()', () => {
  14. it( 'should create Text instance', () => {
  15. const text = writer.createText( 'foo bar' );
  16. expect( text ).to.be.instanceOf( Text );
  17. expect( text.data ).to.equal( 'foo bar' );
  18. } );
  19. } );
  20. } );