Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/63'
Browse files Browse the repository at this point in the history
Conflicts:
	package.json
	test/index.html
  • Loading branch information
Oliver Pulges committed Jul 3, 2014
2 parents 49f6e1b + 3d32273 commit fad9cd4
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 49 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"grunt-contrib-nodeunit": "~0.2.0",
"grunt-contrib-uglify": "~0.3.0",
"happen": "^0.1.3",
"qunitjs": "1.14.0"
"qunitjs": "1.14.0",
"qunit-assert-html": "^0.2.1"
},
"description": "h1. wysihtml5x 0.4.1",
"main": "Gruntfile.js",
Expand Down
32 changes: 0 additions & 32 deletions test/assert/html_equal_test.js

This file was deleted.

4 changes: 2 additions & 2 deletions test/dom/auto_link_test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module("wysihtml5.dom.autoLink", {
equal: function(actual, expected, message) {
return wysihtml5.assert.htmlEqual(actual, expected, message);
return QUnit.assert.htmlEqual(actual, expected, message);
},

autoLink: function(html) {
Expand Down Expand Up @@ -108,4 +108,4 @@ test("Basic test", function() {
"&lt;b&gt;foo&lt;/b&gt; <a href=\"http://www.google.de\">http://www.google.de</a>",
"Check if plain HTML markup isn't evaluated"
);
});
});
4 changes: 2 additions & 2 deletions test/dom/convert_to_list_test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module("wysihtml5.dom.convertToList", {
equal: function(actual, expected, message) {
return wysihtml5.assert.htmlEqual(actual, expected, message);
return QUnit.assert.htmlEqual(actual, expected, message);
},

convertToList: function(html, type) {
Expand Down Expand Up @@ -98,4 +98,4 @@ test("Test whether it doesn't convert dom trees that are already a list", functi
this.convertToList("<ul><li>foo</li></ul>", "ol"),
"<ul><li>foo</li></ul>"
);
});
});
2 changes: 1 addition & 1 deletion test/dom/parse_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if (wysihtml5.browser.supported()) {
},

equal: function(actual, expected, message) {
return wysihtml5.assert.htmlEqual(actual, expected, message);
return QUnit.assert.htmlEqual(actual, expected, message);
}
});

Expand Down
4 changes: 2 additions & 2 deletions test/dom/rename_element_test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module("wysihtml5.dom.renameElement", {
equal: function(actual, expected, message) {
return wysihtml5.assert.htmlEqual(actual, expected, message);
return QUnit.assert.htmlEqual(actual, expected, message);
},

renameElement: function(html, newNodeName) {
Expand All @@ -25,4 +25,4 @@ test("Basic tests", function() {
this.renameElement('<p align="left" class="foo"></p>', "h2"),
'<h2 align="left" class="foo"></h2>'
);
});
});
4 changes: 2 additions & 2 deletions test/dom/resolve_list_test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module("wysihtml5.dom.resolveList", {
equal: function(actual, expected, message) {
return wysihtml5.assert.htmlEqual(actual, expected, message);
return QUnit.assert.htmlEqual(actual, expected, message);
},

resolveList: function(html, useLineBreaks) {
Expand Down Expand Up @@ -75,4 +75,4 @@ test("Basic tests (useLineBreaks = false)", function() {
this.resolveList("<ul><li><h1>foo</h1></li><li><div>bar</div></li><li>baz</li></ul>"),
"<h1>foo</h1><div>bar</div><p>baz</p>"
);
});
});
3 changes: 1 addition & 2 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<script src="../node_modules/qunitjs/qunit/qunit.js"></script>
<script src="../node_modules/happen/happen.js"></script>
<script src="../node_modules/qunit-assert-html/dist/qunit-assert-html.js"></script>

<script src="../src/wysihtml5.js"></script>
<script src="../lib/rangy/rangy-core.js"></script>
Expand Down Expand Up @@ -119,8 +120,6 @@
<script src="../src/dom/contenteditable_area.js"></script>
<!-- -->

<script src="../src/assert/html_equal.js"></script>

<script src="browser_test.js"></script>
<script src="incompatible_test.js"></script>

Expand Down
10 changes: 5 additions & 5 deletions test/quirks/clean_pasted_html_test.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
if (wysihtml5.browser.supported()) {
module("wysihtml5.quirks.cleanPastedHTML");

test("Basic test", function() {
wysihtml5.assert.htmlEqual(
test("Basic test", function(assert) {
assert.htmlEqual(
wysihtml5.quirks.cleanPastedHTML("<u>See: </u><a href=\"http://www.google.com\"><u><b>best search engine</b></u></a>"),
"<u>See: </u><a href=\"http://www.google.com\"><b>best search engine</b></a>",
"Correctly removed <u> within <a>"
);
});

test("Non-breakable space test", function() {
wysihtml5.assert.htmlEqual(
test("Non-breakable space test", function(assert) {
assert.htmlEqual(
wysihtml5.quirks.cleanPastedHTML("test&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"),
"test &nbsp; &nbsp; ",
"Correctly split nonbreakable spaces"
);
});
}
}

0 comments on commit fad9cd4

Please sign in to comment.