Debian Codegraph @

extensions/VisualEditor/lib/ve/tests/ce/ve.ce.LeafNode.test.js

raw symbols SCIP
1 /*!
2 * VisualEditor ContentEditable LeafNode tests.
3 *
4 * @copyright See AUTHORS.txt
5 */
6
7 QUnit.module( 've.ce.LeafNode' );
8
9 /* Stubs */
10
11 ve.ce.LeafNodeStub = function VeCeLeafNodeStub() {
12 // Parent constructor
13 ve.ce.LeafNodeStub.super.apply( this, arguments );
14 };
15
16 OO.inheritClass( ve.ce.LeafNodeStub, ve.ce.LeafNode );
17
18 ve.ce.LeafNodeStub.static.name = 'leaf-stub';
19
20 ve.ce.nodeFactory.register( ve.ce.LeafNodeStub );
21
22 /* Tests */
23
24 QUnit.test( 'splitOnEnter', ( assert ) => {
25 const node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
26 assert.strictEqual( node.splitOnEnter(), false );
27 } );
28
29 QUnit.test( 'canHaveChildren', ( assert ) => {
30 const node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
31 assert.strictEqual( node.canHaveChildren(), false );
32 } );
33
34 QUnit.test( 'canHaveChildrenNotContent', ( assert ) => {
35 const node = new ve.ce.LeafNodeStub( new ve.dm.LeafNodeStub() );
36 assert.strictEqual( node.canHaveChildrenNotContent(), false );
37 } );