Skip to content

Commit

Permalink
Fix unit tests in IE 10
Browse files Browse the repository at this point in the history
  • Loading branch information
samclarke committed May 4, 2018
1 parent ed5dd27 commit 81a6755
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions tests/unit/formats/xhtml.js
Expand Up @@ -118,8 +118,8 @@ QUnit.test('Should not remove empty tags in allowedEmptyTags', function (assert)

QUnit.test('Should not empty tags with a size', function (assert) {
assert.htmlEqual(
this.filterStripWhiteSpace('<p><i style="display:inline-block;width:1px;height:1px;"></i></p>'),
'<p><istyle="display:inline-block;width:1px;height:1px;"></i></p>',
this.filterHtml('<p><i style="display:inline-block;width:1px;height:1px;"></i></p>'),
'<p>\n\t<i style="display:inline-block;width:1px;height:1px;">\n\t</i>\n</p>',
'Empty tag with size'
);
});
Expand Down Expand Up @@ -702,6 +702,8 @@ QUnit.test('Face', function (assert) {
assert.ok(
result === utils.stripWhiteSpace(
'<div style="font-family: arial black;">test</div>') ||
result === utils.stripWhiteSpace(
'<div style="font-family: arial\\ black;">test</div>') ||
result === utils.stripWhiteSpace(
'<div style="font-family: &quot;arial black&quot;;">test</div>') ||
result === utils.stripWhiteSpace(
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/lib/SCEditor.js
Expand Up @@ -18,11 +18,11 @@ var $fixture = $('#qunit-module-fixture');

var testFormat = function () {
this.toHtml = function () {
return '<b>test wysiwyg</b>';
return '<p><b>test wysiwyg</b></p>';
};

this.toSource = function () {
return '<b>test source</b>';
return '<p><b>test source</b></p>';
};
};

Expand Down Expand Up @@ -392,12 +392,12 @@ QUnit.test('getWysiwygEditorValue() - Filter', function (assert) {

assert.htmlEqual(
sceditor.getWysiwygEditorValue(false),
'<b>test wysiwyg</b>'
'<p><b>test wysiwyg</b></p>'
);

assert.htmlEqual(
sceditor.getWysiwygEditorValue(true),
'<b>test source</b>'
'<p><b>test source</b></p>'
);
});

Expand Down Expand Up @@ -428,12 +428,12 @@ QUnit.test('getSourceEditorValue() - Uses format', function (assert) {
sceditor.sourceMode(true);
assert.htmlEqual(
sceditor.getSourceEditorValue(false),
'<b>test source</b>'
'<p><b>test source</b></p>'
);

assert.htmlEqual(
sceditor.getSourceEditorValue(true),
'<b>test wysiwyg</b>'
'<p><b>test wysiwyg</b></p>'
);
});

Expand Down

0 comments on commit 81a6755

Please sign in to comment.