mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
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:
parent
93390847bc
commit
b1d0ed052d
|
@ -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 );
|
||||
} );
|
||||
|
|
|
@ -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 );
|
||||
} );
|
||||
|
|
Loading…
Reference in a new issue