integration wip
[fnpeditor.git] / modules / documentCanvas / tests / utils.test.js
index 7001359..c82e6fb 100644 (file)
@@ -1,29 +1,29 @@
-define(['libs/chai', './utils.js'], function(chai, utils) {\r
-\r
-'use strict';\r
-var assert = chai.assert;\r
-\r
-test('open+open', function() {\r
-    assert.equal(utils.cleanUp('<div class="class"> \n <div class="class"></div></div>'), '<div class="class"><div class="class"></div></div>');\r
-});\r
-\r
-test('close+close', function() {\r
-    assert.equal(utils.cleanUp('<div><div></div>\n </div>'), '<div><div></div></div>');\r
-});\r
-\r
-test('close+open', function() {\r
-    assert.equal(utils.cleanUp('<div></div>\n <div class="class"></div>'), '<div></div><div class="class"></div>');\r
-});\r
-\r
-test('bug', function() {\r
-    var txt = '\\r
-                <section> \\r
-                    <header class="some.class">Head</header>\\r
-                    <header class="some.class">er 1</header>\\r
-                </section>';\r
-    var txt2 = '<section><header class="some.class">Head</header><header class="some.class">er 1</header></section>';\r
-    assert.equal(utils.cleanUp(txt), txt2); \r
-});\r
-\r
-\r
+define(['libs/chai', './utils.js'], function(chai, utils) {
+
+'use strict';
+var assert = chai.assert;
+
+test('open+open', function() {
+    assert.equal(utils.cleanUp('<div class="class"> \n <div class="class"></div></div>'), '<div class="class"><div class="class"></div></div>');
+});
+
+test('close+close', function() {
+    assert.equal(utils.cleanUp('<div><div></div>\n </div>'), '<div><div></div></div>');
+});
+
+test('close+open', function() {
+    assert.equal(utils.cleanUp('<div></div>\n <div class="class"></div>'), '<div></div><div class="class"></div>');
+});
+
+test('bug', function() {
+    var txt = '\
+                <section> \
+                    <header class="some.class">Head</header>\
+                    <header class="some.class">er 1</header>\
+                </section>';
+    var txt2 = '<section><header class="some.class">Head</header><header class="some.class">er 1</header></section>';
+    assert.equal(utils.cleanUp(txt), txt2); 
+});
+
+
 });
\ No newline at end of file