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