1 define(['libs/chai', './utils.js'], function(chai, utils) {
4 var assert = chai.assert;
6 test('open+open', function() {
7 assert.equal(utils.cleanUp('<div class="class"> \n <div class="class"></div></div>'), '<div class="class"><div class="class"></div></div>');
10 test('close+close', function() {
11 assert.equal(utils.cleanUp('<div><div></div>\n </div>'), '<div><div></div></div>');
14 test('close+open', function() {
15 assert.equal(utils.cleanUp('<div></div>\n <div class="class"></div>'), '<div></div><div class="class"></div>');
18 test('bug', function() {
21 <header class="some.class">Head</header>\
22 <header class="some.class">er 1</header>\
24 var txt2 = '<section><header class="some.class">Head</header><header class="some.class">er 1</header></section>';
25 assert.equal(utils.cleanUp(txt), txt2);