import React from "react" import { render } from "enzyme" import Markdown from "components/providers/markdown" import { Markdown as OAS3Markdown } from "corePlugins/oas3/wrap-components/markdown.jsx" describe("Markdown Script Sanitization", function() { describe("Swagger 2.0", function() { it("sanitizes ` const el = render() expect(el.prop("outerHTML")).toEqual(`

script

\n
`) }) it("sanitizes elements", function() { const str = `` const el = render() expect(el.prop("outerHTML")).toEqual(`

\n
`) }) it("sanitizes
elements", function() { const str = `""` const el = render() expect(el.prop("outerHTML")).toEqual(`

"

"

\n
`) }) }) describe("OAS 3", function() { it("sanitizes ` const el = render() expect(el.prop("outerHTML")).toEqual(`

script

`) }) it("sanitizes elements", function() { const str = `` const el = render() expect(el.prop("outerHTML")).toEqual(`

`) }) it("sanitizes elements", function () { const str = `""` const el = render() expect(el.prop("outerHTML")).toEqual(`

"

"

`) }) }) })