Possibly fixes trust tests

This commit is contained in:
John Long 2016-01-05 14:25:52 -07:00
parent 0b9cbd1f82
commit 2cc898877d

View file

@ -20,19 +20,19 @@ describe("m.trust()", function () {
// FIXME: implement document.createRange().createContextualFragment() in the
// mock window for these tests
dom(function () {
xit("isn't escaped in m.render()", function () {
it("isn't escaped in m.render()", function () {
var root = document.createElement("div")
m.render(root, m("div", "a", m.trust("&"), "b"))
expect(root.childNodes[0].innerHTML).to.equal("a&b")
})
xit("works with mixed trusted content in div", function () {
it("works with mixed trusted content in div", function () {
var root = document.createElement("div")
m.render(root, [m.trust("<p>1</p><p>2</p>"), m("i", "foo")])
expect(root.childNodes[2].tagName).to.equal("I")
})
xit("works with mixed trusted content in text nodes", function () {
it("works with mixed trusted content in text nodes", function () {
var root = document.createElement("div")
m.render(root, [
m.trust("<p>1</p>123<p>2</p>"),
@ -43,7 +43,7 @@ describe("m.trust()", function () {
// FIXME: this is a bug (trusted string's contents rendered as just
// textual contents)
xit("works with mixed trusted content in td", function () {
it("works with mixed trusted content in td", function () {
var root = document.createElement("table")
root.appendChild(root = document.createElement("tr"))