選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

24 行
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. })