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

38 行
863 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-3279: Empty Markdown inputs causing bare `undefined` in output", function(){
  7. it("should return no text for `null` as source input", function(){
  8. let props = {
  9. source: null
  10. }
  11. let el = render(<Markdown {...props}/>)
  12. expect(el.text()).toEqual("")
  13. })
  14. it("should return no text for `undefined` as source input", function(){
  15. let props = {
  16. source: undefined
  17. }
  18. let el = render(<Markdown {...props}/>)
  19. expect(el.text()).toEqual("")
  20. })
  21. it("should return no text for empty string as source input", function(){
  22. let props = {
  23. source: ""
  24. }
  25. let el = render(<Markdown {...props}/>)
  26. expect(el.text()).toEqual("")
  27. })
  28. })