mediawiki-extensions-Visual.../tests/ve2/ve.Node.test.js
Rob Moen d42e738636 - Optimize surface model and write unit tests
Change-Id: I8de24c840c5aa2d4232e6e2cc5f72cbd30be96b4
2012-05-04 15:29:47 -07:00

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 );
} );