1 | require './setup'
|
2 |
|
3 | describe 'Pretty Print', ->
|
4 | describe 'default', ->
|
5 | beforeEach ->
|
6 | @load "### Hello\n\n @example\n div", head: ''
|
7 |
|
8 | it 'should work', ->
|
9 |
|
10 | it 'indent <head>', ->
|
11 | expect(@html).match /\n <head/
|
12 |
|
13 | it 'indent <body>', ->
|
14 | expect(@html).match /\n <body/
|
15 |
|
16 | it 'indent .sg-section-hello', ->
|
17 | expect(@html).match /\n {6}<section class="sg-block sg-section-hello/
|
18 |
|
19 | it 'indent .sg-canvas', ->
|
20 | expect(@html).match /\n {10}<div class="sg-canvas/
|
21 |
|
22 | describe 'custom indentSize', ->
|
23 | beforeEach ->
|
24 | @load "### Hello\n\n @example\n div", indentSize: 4, head: ''
|
25 |
|
26 | it 'should work', ->
|
27 |
|
28 | it 'indent <head>', ->
|
29 | expect(@html).match /\n {4}<head/
|
30 |
|
31 | it 'indent <body>', ->
|
32 | expect(@html).match /\n {4}<body/
|
33 |
|
34 | it 'indent .sg-section-hello', ->
|
35 | expect(@html).match /\n {12}<section class="sg-block sg-section-hello/
|
36 |
|
37 | it 'indent .sg-canvas', ->
|
38 | expect(@html).match /\n {20}<div class="sg-canvas/
|
39 |
|
40 | xdescribe 'custom indentSize, no head', ->
|