Added more canHaveChildren tests

These are needed to make sure the base classes behave correctly, the ones in sub classes are needed to make sure the prototypes of the base class are correctly inherited

Change-Id: I334cc3ce1c4c0ce2eed23c79e8877332a953f7c3
This commit is contained in:
Trevor Parscal 2012-04-30 14:43:02 -07:00
parent 93390847bc
commit b1d0ed052d
2 changed files with 10 additions and 0 deletions

View file

@ -28,3 +28,8 @@ test( 'indexOf', 4, function() {
strictEqual( node4.indexOf( node2 ), 1 );
strictEqual( node4.indexOf( node3 ), 2 );
} );
test( 'canHaveChildren', 1, function() {
var node = new ve.BranchNodeStub();
equal( node.canHaveChildren(), true );
} );

View file

@ -10,3 +10,8 @@ ve.LeafNodeStub = function() {
ve.extendClass( ve.LeafNodeStub, ve.LeafNode );
/* Tests */
test( 'canHaveChildren', 1, function() {
var node = new ve.LeafNodeStub();
equal( node.canHaveChildren(), false );
} );