Format XML with xml-but-prettier

This commit is contained in:
Kyle Shockey
2017-11-02 15:13:10 -07:00
parent 034ebb021c
commit 17e6d81504
4 changed files with 5 additions and 83 deletions

View File

@@ -17,7 +17,6 @@ import {
getAcceptControllingResponse,
createDeepLinkPath,
escapeDeepLinkPath,
formatXml,
sanitizeUrl
} from "core/utils"
import win from "core/window"
@@ -888,16 +887,6 @@ describe("utils", function() {
})
})
describe("formatXml", function() {
it("simple xml formatting", function() {
const startTime = Date.now()
const result = formatXml("<xml><name>john doe</name></xml>")
let duration = Date.now() - startTime
expect(result).toEqual("<xml>\n <name>john doe</name>\n</xml>\n")
expect(duration).toBeLessThan(5)
})
})
describe("sanitizeUrl", function() {
it("should sanitize a `javascript:` url", function() {
const res = sanitizeUrl("javascript:alert('bam!')")