/** * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md. */ /* bender-tags: treemodel */ 'use strict'; import Text from '/ckeditor5/core/treemodel/text.js'; import Attribute from '/ckeditor5/core/treemodel/attribute.js'; import AttributeList from '/ckeditor5/core/treemodel/attributelist.js'; describe( 'Text', () => { describe( 'constructor', () => { it( 'should create character without attributes', () => { let attrs = [ new Attribute( 'bold', true ) ]; let text = new Text( 'bar', attrs ); expect( text ).to.have.property( 'text' ).that.equals( 'bar' ); expect( text ).to.have.property( 'attrs' ).that.is.instanceof( AttributeList ); expect( Array.from( text.attrs ) ).to.deep.equal( attrs ); } ); } ); } );