Пример #1
0
 it("can recognize mismatching block types", function () {
   var blockUser = blockUtils.domStringToBlock('<block type="logic_boolean"></block>');
   var blockRequired = blockUtils.domStringToBlock('<block type="block_with_3_titles"><title name="A">10</title></block>');
   assert(!requiredBlockUtils.blocksMatch(blockUser, blockRequired));
 });
Пример #2
0
 it("can recognize non-matching titles in blocks", function () {
   var blockUser = blockUtils.domStringToBlock('<block type="block_with_3_titles"><title name="A">10</title></block>');
   var blockRequired = blockUtils.domStringToBlock('<block type="block_with_3_titles"><title name="A">11</title></block>');
   assert(!requiredBlockUtils.blockTitlesMatch(blockUser, blockRequired));
   assert(!requiredBlockUtils.blocksMatch(blockUser, blockRequired));
 });