X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/c986f6ebfd3d20bdc75ce00ee09bd2c716e0cb16..aa8123dfafba46b530ad5295436074ac29684235:/modules/documentCanvas/tests/canvasNode.test.js?ds=inline diff --git a/modules/documentCanvas/tests/canvasNode.test.js b/modules/documentCanvas/tests/canvasNode.test.js index bc11a80..a1595f7 100644 --- a/modules/documentCanvas/tests/canvasNode.test.js +++ b/modules/documentCanvas/tests/canvasNode.test.js @@ -1,47 +1,62 @@ -define([ -'libs/jquery-1.9.1.min', -'libs/chai', -'./utils.js', -'modules/documentCanvas/canvasNode' -], function($, chai, utils, canvasNode) { - -'use strict'; - -var assert = chai.assert; - -var assertDomEqual = function(lhs, rhs) { - lhs.attr('id', ''); - rhs.attr('id', ''); - return assert.ok(lhs[0].isEqualNode(rhs[0]), 'nodes are equal'); - -} - -suite('Create canvas node', function() { - test('from description', function() { - var node = canvasNode.create({tag: 'header', klass: 'some-class', content: 'some text content'}); - assert.equal(node.getTag(), 'header'); - assert.equal(node.getClass(), 'some-class'); - assert.equal(node.getContent(), 'some text content'); - assertDomEqual($('