mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-16 19:09:29 +00:00
d42e738636
Change-Id: I8de24c840c5aa2d4232e6e2cc5f72cbd30be96b4
28 lines
497 B
JavaScript
28 lines
497 B
JavaScript
module( 've.Node' );
|
|
|
|
/* Stubs */
|
|
|
|
ve.NodeStub = function() {
|
|
// Inheritance
|
|
ve.Node.call( this, 'stub' );
|
|
};
|
|
|
|
ve.extendClass( ve.NodeStub, ve.Node );
|
|
|
|
/* Tests */
|
|
|
|
test( 'getType', 1, function() {
|
|
var node = new ve.NodeStub();
|
|
strictEqual( node.getType(), 'stub' );
|
|
} );
|
|
|
|
test( 'getParent', 1, function() {
|
|
var node = new ve.NodeStub();
|
|
strictEqual( node.getParent(), null );
|
|
} );
|
|
|
|
test( 'getRoot', 1, function() {
|
|
var node = new ve.NodeStub();
|
|
strictEqual( node.getRoot(), node );
|
|
} );
|