UNPKG

845 Btext/coffeescriptView Raw
1cc = require '../lib/coffeecup'
2
3describe 'cede', ->
4 describe 'p "This text could use \#{cede strong -> a href: \'/\', \'a link\'}."', ->
5 it 'should render <p>This text could use <strong><a href="/">a link</a></strong>.</p>', ->
6 t = -> p "This text could use #{cede -> strong -> a href: '/', 'a link'}."
7 cc.render(t).should.equal '<p>This text could use <strong><a href="/">a link</a></strong>.</p>'
8
9describe 'cede optimized', ->
10 describe 'p "This text could use \#{cede -> strong -> a href: \'/\', \'a link\'}."', ->
11 it 'should render <p>This text could use <strong><a href="/">a link</a></strong>.</p>', ->
12 t = -> p "This text could use #{cede -> strong -> a href: '/', 'a link'}."
13 cc.render(t, optimized: true, cache: on).should.equal '<p>This text could use <strong><a href="/">a link</a></strong>.</p>'