Debian Codegraph @

extensions/VisualEditor/lib/ve/tests/ve.Node.test.js

raw symbols SCIP
1 /*!
2 * VisualEditor Node tests.
3 *
4 * @copyright See AUTHORS.txt
5 */
6
7 QUnit.module( 've.Node' );
8
9 /* Stubs */
10
11 ve.NodeStub = function VeNodeStub() {
12 // Parent constructor
13 ve.Node.call( this );
14 };
15
16 OO.inheritClass( ve.NodeStub, ve.Node );
17
18 ve.NodeStub.static.name = 'stub';
19
20 /* Tests */
21
22 QUnit.test( 'getType', ( assert ) => {
23 const node = new ve.NodeStub();
24 assert.strictEqual( node.getType(), 'stub' );
25 } );
26
27 QUnit.test( 'getParent', ( assert ) => {
28 const node = new ve.NodeStub();
29 assert.strictEqual( node.getParent(), null );
30 } );
31
32 QUnit.test( 'getRoot', ( assert ) => {
33 const node = new ve.NodeStub();
34 assert.strictEqual( node.getRoot(), null );
35 } );