X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/c986f6ebfd3d20bdc75ce00ee09bd2c716e0cb16..d8d27d292d0a34cf24f48c769f6bebcb8273fa1d:/modules/documentCanvas/tests/canvasNode.test.js?ds=sidebyside diff --git a/modules/documentCanvas/tests/canvasNode.test.js b/modules/documentCanvas/tests/canvasNode.test.js index bc11a80..5c55d9c 100644 --- a/modules/documentCanvas/tests/canvasNode.test.js +++ b/modules/documentCanvas/tests/canvasNode.test.js @@ -33,6 +33,21 @@ suite('Create canvas node', function() { }); }); +suite('class information', function() { + test('class of', function() { + var node = canvasNode.create({tag: 'header', klass: 'a-b-c'}); + assert.ok(node.isOfClass('a'), 'first level'); + assert.ok(node.isOfClass('a-b'), 'second level'); + assert.ok(node.isOfClass('a-b-c'), 'third level'); + assert.notOk(node.isOfClass('b-c')); + + var node2 = canvasNode.create({tag: 'header'}); + assert.notOk(node2.isOfClass('b')); + + }); + +}); + suite('comparing nodes', function() { test('isSame', function() { var html = '
';