2012-07-19 00:11:26 +00:00
|
|
|
/**
|
|
|
|
* VisualEditor data model TextNode tests.
|
2012-07-19 21:25:16 +00:00
|
|
|
*
|
2012-07-19 00:11:26 +00:00
|
|
|
* @copyright 2011-2012 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
2012-04-30 20:48:20 +00:00
|
|
|
module( 've.dm.TextNode' );
|
|
|
|
|
|
|
|
/* Tests */
|
|
|
|
|
2012-07-10 19:46:08 +00:00
|
|
|
test( 'getOuterLength', 2, function( assert ) {
|
2012-04-30 20:48:20 +00:00
|
|
|
var node1 = new ve.dm.TextNode(),
|
|
|
|
node2 = new ve.dm.TextNode( 1234 );
|
2012-07-10 19:46:08 +00:00
|
|
|
assert.strictEqual( node1.getOuterLength(), 0 );
|
|
|
|
assert.strictEqual( node2.getOuterLength(), 1234 );
|
2012-04-30 20:48:20 +00:00
|
|
|
} );
|