Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

24 rindas
649 B

  1. /* eslint-env mocha */
  2. import React from "react"
  3. import expect from "expect"
  4. import { render } from "enzyme"
  5. import Markdown from "components/providers/markdown"
  6. describe("UI-3199: Sanitized Markdown causing code examples to be double escaped", function(){
  7. it("should single-escape quotes", function(){
  8. let str = "" +
  9. "This is a test: \n\n" +
  10. " {\"abc\": \"def\"}\n"
  11. let props = {
  12. source: str
  13. }
  14. let el = render(<Markdown {...props}/>)
  15. expect(el.find("code").first().text()).toEqual("{\"abc\": \"def\"}\n")
  16. expect(el.find("code").first().html()).toEqual("{&quot;abc&quot;: &quot;def&quot;}\n")
  17. })
  18. })