项目原始demo,不改动
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
Bu depo arşivlendi. Dosyaları görüntüleyebilir ve klonlayabilirsiniz ama işlem gönderemez ve konu/değişiklik isteği açamazsınız.
 
 
 
 

19 satır
618 B

  1. tools = require '../src/tools'
  2. describe "tools", ->
  3. describe "quote()", ->
  4. it "should convert html special strings to their entities", ->
  5. tools.quote(" abc<>\"\n")
  6. .should.equal '&sp;abc&lt;&gt;&quot;<br />'
  7. describe "stringToDom()", ->
  8. it "should work", ->
  9. tools.stringToDom('<a> text<a1>text</a1> text <a2>text</a2><a3>text</a3>text</a>text')
  10. describe "objectToDom()", ->
  11. it "should work", ->
  12. tools.objectToDom({a: 'text'})
  13. it "should have quoted text nodes", ->
  14. tools.objectToDom({a: '&<> "'})[0].children[0]
  15. .data.should.equal '&amp;&lt;&gt;&sp;&quot;'