UNPKG

891 Btext/coffeescriptView Raw
1require './setup'
2
3describe 'Markdown', ->
4 describe 'with template', ->
5 beforeEach ->
6 @load '''
7 # Hello
8 there
9 ''', head: ''
10
11 it 'text', ->
12 expect(@$("h1").text()).eql 'Hello'
13 expect(@$("p").text()).eql 'there'
14
15 it 'classnames', ->
16 expect(@$).have.selector 'h1.sg'
17 expect(@$).have.selector 'p.sg'
18
19 it 'html template', ->
20 expect(@html).match /doctype html/
21 expect(@html).match /body/
22 expect(@html).match /head/
23 expect(@$).have.selector 'meta[charset="utf-8"]'
24 expect(@$("title").text().length).gt 0
25
26 describe 'bare', ->
27 beforeEach ->
28 @load '''
29 # Hello
30 there
31 '''
32
33 it 'text', ->
34 expect(@$("h1").text()).eql 'Hello'
35 expect(@$("p").text()).eql 'there'
36
37 it 'classnames', ->
38 expect(@$).have.selector 'h1.sg'
39 expect(@$).have.selector 'p.sg'
40